Conversation
|
I do not see the |
There is actually an extension, but bf16 aspect there is known under different name. @AidanBeltonS can these names be united? |
Yes, ideally we would unite the two aspects. I think this has been discussed a bit before: #5645 (comment) |
s-kanaev
left a comment
There was a problem hiding this comment.
Other than the comments, the change LGTM.
sycl/include/CL/sycl/aspects.hpp
Outdated
| ext_oneapi_native_assert = 31, | ||
| host_debuggable = 32, | ||
| ext_intel_gpu_hw_threads_per_eu = 33, | ||
| bf16 = 34 |
There was a problem hiding this comment.
To reduce changes in future:
| bf16 = 34 | |
| bf16 = 34, |
| _ZNK2cl4sycl6device8get_infoILNS0_4info6deviceE65809EEENS3_12param_traitsIS4_XT_EE11return_typeEv | ||
| _ZNK2cl4sycl6device8get_infoILNS0_4info6deviceE65810EEENS3_12param_traitsIS4_XT_EE11return_typeEv | ||
| _ZNK2cl4sycl6device8get_infoILNS0_4info6deviceE69632EEENS3_12param_traitsIS4_XT_EE11return_typeEv | ||
| _ZNK2cl4sycl6device8get_infoILNS0_4info6deviceE73728EEENS3_12param_traitsIS4_XT_EE11return_typeEv |
There was a problem hiding this comment.
Probably, a PATCH version in CMakeLists should be incremented to denote a non-breaking change. @alexbatashev , please, correct me if I'm wrong.
Please, refer to https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/ABIPolicyGuide.md#abi-versioning-policy.
There was a problem hiding this comment.
I am not sure if the PATCH version should be updated as in the abi-versioning-policy docs it states. MAJOR, MINOR, and PATCH versions are not updated between releases.
| @@ -1,4 +1,4 @@ | |||
| = SYCL_INTEL_bf16_conversion | |||
| = SYCL_ONEAPI_bfloat16 | |||
There was a problem hiding this comment.
I think your branch must be out-of-date because these specification file names are now all lower case. You should merge the base and resolve conflicts (or maybe it will just be easier to start a new PR).
The name of the file should stay in sync with the feature-test macro. Since you are renaming the feature-test macro to "SYCL_EXT_ONEAPI_BFLOAT16_CONVERSION", the file name should be "sycl_ext_oneapi_bfloat16_conversion.asciidoc". The name of the extension (on line 1 of this file) should also be lowercase: "sycl_ext_oneapi_bfloat16_conversion".
However, maybe you are preparing this extension to encompass all bfloat16 features, rather than just conversion? As I mentioned in #5645, I think it would be better to have a single bloat16 extension like this. In that case, the name of the feature-test macro should be "SYCL_EXT_ONEAPI_BFLOAT16", the name of the extension should be "sycl_ext_oneapi_bfloat16", and the name of the file should be "sycl_ext_oneapi_bfloat16.asciidoc".
Finally, the header file "include/CL/sycl/feature_test.hpp" should also be updated to define the new feature-test macro, and you should remove the definition of the old feature-test macro.
There was a problem hiding this comment.
No changes to the extension are in this PR anymore. The extension was updated by #5393.
So the new aspect is inline with the the extension
There was a problem hiding this comment.
Thanks. I think this looks good.
@smaslov-intel, do you want a chance to review this from the implementation point of view?
sycl/include/CL/sycl/detail/pi.h
Outdated
| PI_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES = 0x11000, | ||
| PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU = 0x10112, | ||
| PI_DEVICE_INFO_BACKEND_VERSION = 0x10113, | ||
| PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16 = 0x12000, |
There was a problem hiding this comment.
Let's not create more than necessary gaps in numbering. Please use 0x1FFFF
There was a problem hiding this comment.
Okay thanks. I have updated the value
|
Why don't you add a test for real "bfloat16" support, if the aspect is reported? |
Could you clarify what you mean by this? Finding out if the device supports bfloat16 is backend dependent and involves calling native CUDA functions. |
Can you also add a test that really uses bfloat16 after the aspect check returns true? |
Yes, I have made a change to |
|
/verify with intel/llvm-test-suite#888 |
|
@AidanBeltonS, can you fix conflicts please? |
I have resolved all conflicts. |
This PR adds the bf16 aspect to aspects.cpp test. Depends on: intel/llvm#5720
intel#5720 added a new specialization of get_info for info::device::ext_oneapi_bfloat16 but no Windows symbol was added to the dump file. This commit adds the missing symbol. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
#5720 added a new specialization of get_info for info::device::ext_oneapi_bfloat16 but no Windows symbol was added to the dump file. This commit adds the missing symbol. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
This PR adds the bf16 aspect to aspects.cpp test. Depends on: intel#5720
This PR adds a new aspect
ext_oneapi_bfloat16to allow a runtime check for if the device supports the bfloat16 floating point type.Only the CUDA implementation for checking if the device supports this aspect is added.
Updated test: intel/llvm-test-suite#888