-
Notifications
You must be signed in to change notification settings - Fork 30
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
gh-886: Added 3 new device attributes and kernel's device-specific attributes #894
Conversation
View rendered docs @ https://intelpython.github.io/dpctl/pulls/894/index.html |
103e9ee
to
f6369f2
Compare
These are DPCTLDevice_GetGlobalMemCacheSize, DPCTLDevice_GlobalMemCacheLineSize, and DPCTLDevice_GetGlobalMemCacheType. To support the latter, introduced DPCTLGlobalMemCacheType enum in dpctl_sycl_enum_types.h Tests are added to test_capi target.
f6369f2
to
fc0e4b2
Compare
6c1b5b8
to
6082c0b
Compare
* dpctl.SyclDevice.global_mem_cache_size * dpctl.SyclDevice.global_mem_cache_line_size * dpctl.SyclDevice.global_mem_cache_type The last property output is a new enum dpctl.global_mem_cache_type which can assume 3 values: none, read_only, and read_write
6082c0b
to
bcf1a14
Compare
max_sub_group_size property is currently on hold due to an issue in DPC++ runtime
c3a6d4e
to
2870b50
Compare
dpctl/_sycl_device.pyx
Outdated
int: Cache size in bytes | ||
""" | ||
cdef uint64_t cache_sz = DPCTLDevice_GetGlobalMemCacheSize( | ||
self._device_ref) |
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.
close paren should be on next line.
dpctl/_sycl_device.pyx
Outdated
int: Cache size in bytes | ||
""" | ||
cdef uint64_t cache_line_sz = DPCTLDevice_GetGlobalMemCacheLineSize( | ||
self._device_ref) |
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.
same formatting change here
dpctl/program/_program.pyx
Outdated
a multiple, for executing the kernel on the device it was built for. | ||
""" | ||
cdef size_t v = DPCTLKernel_GetPreferredWorkGroupSizeMultiple( | ||
self._kernel_ref) |
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.
formatting
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.
Also the explanation reads a bit awkward. How about:
Returns a number whose multiple is the preferred work-group size for the specified kernel on the selected device.
* | ||
* @param KRef DPCTLSyclKernelRef pointer to an OpenCL | ||
* @param KRef DPCTLSyclKernelRef pointer to an SYCL |
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.
typo: to a SYCL
* | ||
* @param KRef DPCTLSyclKernelRef pointer to an OpenCL | ||
* @param KRef DPCTLSyclKernelRef pointer to an SYCL |
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.
same typo
* | ||
* @param KRef DPCTLSyclKernelRef pointer to an SYCL | ||
* interoperability kernel. | ||
* @return Returns a value, of which work-group size is preferred to be a |
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.
My reuse the docstring from the Python function corresponding to the C API function.
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.
Thank! Please fix the minor typo etc. and merge.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Closes #886
These are
DPCTLDevice_GetGlobalMemCacheSize
,DPCTLDevice_GlobalMemCacheLineSize
,and
DPCTLDevice_GetGlobalMemCacheType
.To support the latter, introduced
DPCTLGlobalMemCacheType
enum in"dpctl_sycl_enum_types.h"
.Tests are added to test_capi target.