-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Changing all PI APIs to the standard format of returning pi_result #776
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
Conversation
@garimagu |
But only for a few APIs.
|
6910497
to
51f066a
Compare
Please review only the last commit. The other commits are from #708 |
51f066a
to
0868f4f
Compare
@romanovvlad, does this have any impact on performance? |
Yes, it can have performance impact, however I don't think it will be significant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for doing this!
0868f4f
to
83b1c51
Compare
I rebased it because of conflicts. Please approve again. |
83b1c51
to
53f411c
Compare
…sult. Signed-off-by: Garima Gupta <[email protected]>
53f411c
to
c8c4d15
Compare
Had to fix an error that appeared while merging. Please approve again. |
how can I see the change that was made since I last approved it? |
I did not create a new commit. I used commit --amend, so you cannot see that specific change. While merging, I missed this change in the variable name, and used the older DstOffset variable name because of which FileCheck was failing to match the CHECK Statement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
fail on windows is seen on device_event.cpp |
void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, | ||
void *user_data1), | ||
void *user_data, pi_context *retcontext) { | ||
pi_result ret = PI_INVALID_OPERATION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: Most OpenCL API functions do not return CL_INVALID_OPERATION
. While the CL API call should always provide an expected return value it might still be worth to initialize the return code variable to something that always works in OpenCL - even if not very helpful - for example CL_OUT_OF_RESOURCES
?
(Applies to all changes of the create functions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is in opposite good to return something that underlying run-times to not normally return like PI_INVALID_OPERATION, for cases when the run-time did not want (or could not) set its error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to document this in pi.h file where we have the declarations of the APIs.
Signed-off-by: Garima Gupta <[email protected]>
@bjoernknafla @smaslov-intel |
A lot of tests failed on Windows. Do you plan to address them? If it is an infrastructure problem, you should probably re-run the tests to make sure you don't introduce a regression. |
Local testing did not show these errors. They are mostly infrastructure issues, since I can also see them on other PRs. I have restarted the tests and also contacted the QA team regarding this issue. |
Signed-off-by: Garima Gupta <[email protected]>
@romanovvlad @bader @smaslov-intel |
Signed-off-by: Garima Gupta <[email protected]>
Kindly, approve and merge. Testing will take another ~10 hours. If it is possible, please merge without waiting for the testing to complete. |
Please review only the last commit. The other commits are from #708
Signed-off-by: Garima Gupta [email protected]