-
Notifications
You must be signed in to change notification settings - Fork 754
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
[SYCL][CUDA] Pass device from context in create queue. #10491
Conversation
Signed-off-by: JackAKirk <[email protected]>
Signed-off-by: JackAKirk <[email protected]>
do we need then the device argument in urQueueCreateWithNativeHandle? I think the reason why make_queue passes nullptr for device is that the native queue has been created already in a given device, so it's not like you can create the new queue with the native handle in another device. |
@jandres742 @kbenzie @pbalcer @rdeodhar I've created an issue for the question posed regarding the device argument in the appropriate place: oneapi-src/unified-runtime#778 This PR is a simple bug fix so |
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for #10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
Recently in the switch to UR `urQueueCreateFromNativeHandle` changed the previous behaviour whereby a queue was created with a device taken as the default device from the context. It changed it so that the queue was created with the device argument instead. Since the sycl runtime always passes a nullptr for the device when programmers call `make_queue(nativeStream, context)`, this broke `make_queue`. This patch reverts to the previous behaviour before the switch from pi cuda to ur cuda. Note that this should also fix `make_queue` for l0 which I also guess was broken due to the asserts meaning that this line was never reached: https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/ur/adapters/level_zero/queue.cpp#L574. But I have not tested this. --------- Signed-off-by: JackAKirk <[email protected]>
) This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to intel#10491. --------- Signed-off-by: Jack Kirk <[email protected]>
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel/llvm#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel/llvm#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
) This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to intel#10491. --------- Signed-off-by: Jack Kirk <[email protected]>
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel/llvm#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
Recently in the switch to UR `urQueueCreateFromNativeHandle` changed the previous behaviour whereby a queue was created with a device taken as the default device from the context. It changed it so that the queue was created with the device argument instead. Since the sycl runtime always passes a nullptr for the device when programmers call `make_queue(nativeStream, context)`, this broke `make_queue`. This patch reverts to the previous behaviour before the switch from pi cuda to ur cuda. Note that this should also fix `make_queue` for l0 which I also guess was broken due to the asserts meaning that this line was never reached: https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/ur/adapters/level_zero/queue.cpp#L574. But I have not tested this. --------- Signed-off-by: JackAKirk <[email protected]>
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel/llvm#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
This PR adds missing functions in the hip backend to allow for interoperability in programs that create sycl objects from native hip objects. The new function implementations are: - `make_device` - `make_queue` - `make_event` Note that it would really make sense for intel/llvm#10491 to be merged first because this PR makes the same code change in pi2ur, for a fix that is attributed to #10491. --------- Signed-off-by: Jack Kirk <[email protected]>
Recently in the switch to UR
urQueueCreateFromNativeHandle
changed the previous behaviour whereby a queue was created with a device taken as the default device from the context. It changed it so that the queue was created with the device argument instead. Since the sycl runtime always passes a nullptr for the device when programmers callmake_queue(nativeStream, context)
, this brokemake_queue
. This patch reverts to the previous behaviour before the switch from pi cuda to ur cuda.Note that this should also fix
make_queue
for l0 which I also guess was broken due to the asserts meaning that this line was never reached: https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/ur/adapters/level_zero/queue.cpp#L574. But I have not tested this.