nvicia/cuda-context: Don't modify the primary context

Doing so could potentially cause other CUDA implementations to suddenly fail.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-05-12 02:48:37 +02:00 committed by Michael Fabian Dirks
parent 1902df524c
commit ef283d219c
2 changed files with 2 additions and 4 deletions

View file

@ -71,8 +71,6 @@ nvidia::cuda::context::context(std::shared_ptr<::nvidia::cuda::cuda> cuda, ID3D1
throw std::runtime_error("Failed to acquire primary device context.");
}
_cuda->cuDevicePrimaryCtxSetFlags(_device, cu_context_flags::SCHEDULER_YIELD);
_has_device = true;
}
#endif

View file

@ -27,8 +27,8 @@ namespace nvidia::cuda {
::nvidia::cuda::cu_context_t _ctx;
// Primary Device Context
bool _has_device;
std::int32_t _device;
bool _has_device;
::nvidia::cuda::cu_device_t _device;
private:
context(std::shared_ptr<::nvidia::cuda::cuda> cuda);