Skip to content

[SYCL][CUDA] Support multiple devices #3745

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
zjin-lcf opened this issue May 13, 2021 · 4 comments
Closed

[SYCL][CUDA] Support multiple devices #3745

zjin-lcf opened this issue May 13, 2021 · 4 comments
Labels
cuda CUDA back-end enhancement New feature or request

Comments

@zjin-lcf
Copy link
Contributor

Add a relevant issue for multiple Nvidia GPUs when running the example #3583

Thanks.

llvm/sycl/plugins/cuda/pi_cuda.cpp:1588: pi_result cuda_piContextCreate(const pi_context_properties*, pi_uint32, _pi_device* const*, void ()(const char, const void*, size_t, void*), void*, _pi_context**): Assertion `num_devices == 1' failed.

@zjin-lcf zjin-lcf added the enhancement New feature or request label May 13, 2021
@alexbatashev alexbatashev added the cuda CUDA back-end label May 13, 2021
@AerialMantis AerialMantis added the runtime Runtime library related issue label Aug 23, 2021
@AerialMantis
Copy link
Contributor

@zjin-lcf there is a ticket for exploring support for multi-device contexts in the CUDA backend - #4381, does this cover what you're looking for?

@zjin-lcf
Copy link
Contributor Author

You were discussing the implementation details of the feature. I wonder if the concept of "context" can be hidden from a user. For example, if there are N devices on a platform, then N queues must be created for N devices.

Thanks for your question. It covers what people looked for.

@AerialMantis
Copy link
Contributor

Apologies for the delayed reply. So in SYCL there is always a context associated with work being enqueued to a device, in some cases this is implicit, for example if a queue is constructed it will create an implicit context. However, the context is used to ensure efficient sharing of data between devices which have visibility of each other's memory, those from the same platform, so to ensure this a queue can be constructed from an explicit context. So the user can choose to create a separate context per device or use a shared context.

@AerialMantis AerialMantis removed the runtime Runtime library related issue label May 17, 2022
@zjin-lcf
Copy link
Contributor Author

No problem. Thank you for your explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants