-
Notifications
You must be signed in to change notification settings - Fork 71
Check if device support heterogeneous memory #88
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
124a805
to
42ac055
Compare
This comment was marked as resolved.
This comment was marked as resolved.
42ac055
to
e98f4e2
Compare
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 @sherry-yuan 🙂
Maybe title the commit Add buffer location to supported extensions
since it is always supported?
4030428
to
6e3281f
Compare
I think something is wrong with the windows machine, ninja got uninstalled?
|
No worries, this looks like a temporary failure, maybe related to actions/cache. The previous run failed on Windows 2022 with a similar error of |
------------------------------------------------------------------------ The query for CL_DEVICE_EXTENSIONS will have nonzero return size, the checks can now be removed to check there are positive number of extensions.
--------------------------------------------------------------------------- The string literall returned is statically allocated so that it is safe to return one from a function. The reason why std::string was not used. once modified, the c_cstr() pointer may no longer be valid. Futher tsan reported a heap use after free error if the acl_platform_extensions return std::string instead.
-------------------------------------------------------------------------- For sycl runtime to check whether a lower runtime library support a specific extension, they use clGetDeviceInfo with CL_DEVICE_EXTENSIONS as query parameter. If the extension of interest appears in the string then the runtime will use the extension accordingly. Otherwise the extension will have no effect.
6e3281f
to
382297d
Compare
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 Sherry! I have revised the commit series slightly while keeping the contents the same.
When committing a change, think of it like a story where each commit contains a different aspect of your change. Rather than a chronological series, try to organise your commits into a logical series, where each commit is as self-contained as possible.
Taking this change as an example, you have three self-contained changes.
- Checking for
size_ret > 0
in all cases. This is independent of the other changes, so you can make this change anywhere in the series; usually I prefer to get these out of the way first so the reviewer can focus on the actual change thereafter. - Factoring out and testing the extensions string. Since you want to proof that your desired change, adding the
buffer_location
extension, does not break the test, this commit should come before the next commit. - Now you can add the new extension. Not only have you proven that your change does not break the test, you have also shown that the test does not require any modification to test your new extension string, which was the point of factoring out the extension string.
A fine-grained commit series makes sense when the maintainers value their code history, i.e., merge or rebase pull-request branches as is. Fine-grained commits can be immensely valuable for later reading and comprehension, or easy cherry-picking to release branches, to give only two of many examples. On the other hand, when pull-request branches are merged by squashing down to a single commit, the effort is unfortunately in vain.
Thanks @pcolberg for the guide! In this case we would prefer a PR to contain multiple commits where each is a self-contained change rather than squashing all to one commit? |
Yes, because in this PR each commit introduces a new aspect of your change, multiple commits are justified. On the other hand, consider another example of one commit making a small change and the next commit applying If in doubt, I would always tend to more commits rather than fewer; commits can always be squashed if desired, but unsquashing a commit requires more work. |
I see, thanks! |
Currently sycl runtime is trying to distinguish whether buffer location is supported on the target device using lower level runtime getDeviceInfo call to determine it. However current runtime get device info does not yet support accepting the buffer location property yet, this change addes it.
The referenced sycl runtime PR: intel/llvm#5604
This change is only needed if sycl runtime cannot come up with an workaround.