Skip to content

Default context has multiple devices which is not supported by CUDA and HIP plugins #4541

Closed
@npmiller

Description

@npmiller

This was introduced with:

The issue is that the default context it creates contains multiple devices which is not supported by the CUDA or HIP plugins, which means that on machines with multiple NVidia or AMD GPUs, the default queue creation will fail on Linux.

There's several ways of fixing this at the application level, setting the environment variable SYCL_ENABLE_DEFAULT_CONTEXTS to 0, creating the context manually like in intel/llvm-test-suite#433

However we should probably fix it at the DPC++ level as it is quite confusing, but I'm not entirely sure how we should fix it:

  • Disable it by default if either CUDA or HIP plugins are built (default selected with preprocessor define at the moment)?
  • Still create it but only with one device (not sure if that would work if the device from the selector is not in the default context)
  • Completely bypass the extension at runtime depending on the plugin being used?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions