Skip to content

New CSR protocal from the compiler with separated start registers #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

ericxu233
Copy link
Contributor

@ericxu233 ericxu233 commented Oct 12, 2022

The compiler backend is now looking for support for CSR changes where we separate start into different registers rather than putting it into the CSR register. This will reduce kernel start latency since the runtime won't have to do a read before write and the CRA module would avoid a read operation which is not cheap at this moment (I think).

@ericxu233 ericxu233 marked this pull request as draft October 12, 2022 23:23
@ericxu233 ericxu233 changed the title New CSR protocal from the compiler with separated start/busy/done/stall registers New CSR protocal from the compiler with separated start registers Nov 2, 2022
@ericxu233 ericxu233 marked this pull request as ready for review November 4, 2022 00:24
@ericxu233 ericxu233 marked this pull request as draft November 4, 2022 00:27
@ericxu233
Copy link
Contributor Author

@pcolberg @zibaiwan This PR currently breaks runtime backwards compatibility since we added new registers to the CSR and the addresses are shifted. How should we maintain the runtime backwards compatibility going forward? The runtime must first query the CSR version before setting up the proper addresses to the registers. How would we do that?

I'm thinking of maybe adding an offset to the address once the CSR version number is set. What are your thoughts?

@zibaiwan
Copy link
Contributor

zibaiwan commented Nov 7, 2022

Hi @ericxu233,

How should we maintain the runtime backwards compatibility going forward? The runtime must first query the CSR version before setting up the proper addresses to the registers. How would we do that?

Currently the runtime is already queries the CSR version before read/write into the CSR at here.

It is set in the kern->csr_version.

I'm thinking of maybe adding an offset to the address once the CSR version number is set. What are your thoughts?

Currently the runtime support two different CSR versions. The 4 one is the latest one created by the compiler. through the code, you should be able to see that the runtime does something different for the older CSR version 3.

#define CSR_VERSION_ID_18_1 (3) #define CSR_VERSION_ID_19_1 (4)

I assume you will need to add a #define CSR_VERSION_ID_2023_1 (5), once read the CSR version, you do something different for the CSR version 5. I think defining an OFFSET is a reasonable approach.

Best regards,

Zibai

@ericxu233 ericxu233 marked this pull request as ready for review November 7, 2022 19:08
@ericxu233
Copy link
Contributor Author

@zibaiwan @pcolberg Ready for review now. This change preserves runtime backwards compatibility so it is safe to merge with older versions of the compiler. I believe that this needs to be merged before my compiler change goes into trunk. Also, with the new CSR version 5, forward compatibility is no longer possible (not sure if we support it in the first place). I can drop by tomorrow's runtime meeting to give a overview of the change if possible. Thanks :)

@ericxu233
Copy link
Contributor Author

sycl-l3 passed (fixed issues related to my change): https://spetc.intel.com/testsummary?testRunIds=7158950

@zibaiwan
Copy link
Contributor

zibaiwan commented Nov 7, 2022

@zibaiwan @pcolberg Ready for review now. This change preserves runtime backwards compatibility so it is safe to merge with older versions of the compiler. I believe that this needs to be merged before my compiler change goes into trunk. Also, with the new CSR version 5, forward compatibility is no longer possible (not sure if we support it in the first place). I can drop by tomorrow's runtime meeting to give a overview of the change if possible. Thanks :)

@ericxu233, I took a quick look of your change, they look good to me. I will take a closer took after your overview tomorrow. Thanks Eric!

@ericxu233
Copy link
Contributor Author

ericxu233 commented Nov 9, 2022

@pcolberg @zibaiwan After further discussion with the compiler team, we decided to only go with the start signal change and not anything else for this release. So this is good to go in for now. The reason being is that the other signals may require more effort and redesign for the separation and not as important as the start signal.

@pcolberg
Copy link
Contributor

pcolberg commented Nov 9, 2022

@pcolberg @zibaiwan After further discussion with the compiler team, we decided to only go with the start signal change and not anything else for this release. So this is good to go in for now. The reason being is that the other signals may require more effort and redesign for the separation and not as important as the start signal.

Thanks @ericxu233! Could you address the comment? Other than that, this is good to go 🙂

@pcolberg pcolberg added the enhancement New feature or request label Nov 9, 2022
@pcolberg pcolberg added this to the 2023.1 milestone Nov 9, 2022
@ericxu233 ericxu233 force-pushed the csr-work branch 2 times, most recently from 8b6f205 to 377a24e Compare November 10, 2022 18:35
@zibaiwan zibaiwan self-requested a review November 10, 2022 18:41
zibaiwan
zibaiwan previously approved these changes Nov 10, 2022
Copy link
Contributor

@zibaiwan zibaiwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eric!

Enbaled backwards compatibility with the new CSR change
@pcolberg pcolberg merged commit ffc62b6 into intel:main Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants