I have two rtx3090 gpus, and i want to bind them in one context. but below code:
int main() {
std::vector<sycl::device> devices = sycl::device::get_devices();
std::vector<sycl::device> gpu_devices;
for (const auto& device : devices) {
std::cout<<device.get_info<sycl::info::device::name>()<<std::endl;
if (device.get_info<sycl::info::device::name>().find("3090") != std::string::npos) {
gpu_devices.push_back(device);
}
}
sycl::context ctx(gpu_devices);
return 0;
}
it throw error : what(): Can't add devices across platforms to a single context. -33 (PI_ERROR_INVALID_DEVICE)
And the output of this code is:
Platform: Intel(R) OpenCL
Device: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz
Platform: Intel(R) OpenCL
Device: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz
Platform: Intel(R) FPGA Emulation Platform for OpenCL(TM)
Device: Intel(R) FPGA Emulation Device
Platform: NVIDIA CUDA BACKEND
Device: NVIDIA GeForce RTX 3090
Platform: NVIDIA CUDA BACKEND
Device: NVIDIA GeForce RTX 3090
My expected output is
Platform: NVIDIA CUDA BACKEND
Device: NVIDIA GeForce RTX 3090
Device: NVIDIA GeForce RTX 3090
I want to know why the same GPU at different platform