-
Notifications
You must be signed in to change notification settings - Fork 32
Review sub devices v2 #352
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* We need at least CMake 3.15 for dpctl-capi. (#299) * Do not use POP_FRONT in FindDPCPP.cmake so that we can use a cmake version older that 3.15. * Run GitHub Actions for all PRs * Update CHANGELOG
- Add a new dpctl_sycl_device_manager module to store a
cache of root devices along with a cached context per
device.
- The device manager includes functions to get a vector of
devices and the number of root devices of a specific type
and backend combination.
- Move the DPCTLDevice_DumpInfo() to a new module called
dpctl_sycl_device_manager, and rename it to
DPCTLDeviceMgr_PrintDeviceInfo().
- Introduce a new _sycl_device_factory module in the Python API.
- Move device selector functions to the _sycl_device_factory
module.
- Add functions to get list of SYCL devies in dpctl.
* Add support of Current DPCPP aspects to dpctl. * All aspects are now available in the C API using the `DPCTLDevice_HasAspect` function. * Previous C API functions to get atomics aspects are now removed. * Add utilities functions to convert SYCL aspects to dpctl aspect types and vice-versa * Add a utility function to convert aspects to string. Co-authored-by: etotmeni <[email protected]>
…use them in tests intsead of has_cpu_queue,etc. (#320) Co-authored-by: Oleksandr Pavlyk <[email protected]>
…eing copied to the layout
This way _SyclDevice, which can be create with data attributes default using _SyclDevice() can not be used (no methods defined). Modified __repr__ for SyclDevice to reflect backend, device kind and the the device name as reported by dev.get_info<sycl::info::device::name>().
1. error_handler function typedef changed 2. DPCTLDevice_Copy, DPCTLQueue_Copy added 3. DPCTLDeviceMgr_GetContextAndDevicePair exported as well as the struct it returns.
SyclQueue(device_selector, props) SyclQueue(sycl_device, props) SyclQueue(sycl_context, sycl_device, props) create SyclQueue from given data. A default asynch error handler is used. The error handler raises SyclAsynchronousError.
Removed get_num_queues, has_cpu_queues, has_gpu_queues. The context manager accepts device selector string, device, or a queue itself.
[X] Implementation [X] Header + Documentation comment [X] Two tests in test_sycl_context.cpp [X] Exported in `dpctl/_backend.pxd`
Returns list of SyclDevice objects associated with the given queue.
Added method device_count (perhaps could be a property), and used it to give different __repr__ outputs for single-device contexts and multi-device context instances.
When creating from a device, we must look up cached DeviceAndContext pair first, and only if that fails call DPCTLContext_Create SyclContext was not doing a look-up, and SyclQueue was not doing the creation is the lookup were to fail.
Added two more tests to test_sycl_context.py One of them is skipped due to a bug in DPC++, which is expected to be fixed in update 2 of oneAPI 2021
Also fixed alignment of colons in the docstring.
Prominently state that _create deletes its argument reference variable. DPCTL opaque pointers will be consumed by most _init_* functions. Enabled test which was xfailed waiting for the DPCPP update.
Modified test to reflect that.
references by opaque pointers in the given array, making these copies is removed from Cython.
#Change vector to DeviceVectorRef
It was placed in the middle of initialization code block, separating `__cinit__` from `_init_*` routines it uses.
Fixes GCC compilation warning.
1. create_sub_devices requires use of keyword argument parition. Usage is d.create_sub_devices(partition=4) 2. Plugged possible memory leak in create_sub_devices_by_counts which memory allocated for array would not be freed if sub-devices vector was returned NULL 3. Changed signature of create_sub_device_by_counts from accepting object of type list, to accepting any object, which is checked to be Sized (len(obj) is expected to work), and Iterable, i.s. iteration of elements works 4. Changes to accept all integral types, such as np.int32, not just python int. 5. Got rid of _raise_create_sub_devices_exception function, and replaced it with explicit raise CreateSubDevicesError(message)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cleaned up version of #343