Skip to content

Commit 1744d31

Browse files
committed
[SYCL][CUDA] Only use scoped context for free memory
1 parent e7e0165 commit 1744d31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,6 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
11831183

11841184
assert(device != nullptr);
11851185

1186-
ScopedContext active(device);
1187-
11881186
switch (param_name) {
11891187
case PI_DEVICE_INFO_TYPE: {
11901188
return getInfo(param_value_size, param_value, param_value_size_ret,
@@ -1963,6 +1961,7 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
19631961
}
19641962

19651963
case PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY: {
1964+
ScopedContext active(device);
19661965
size_t FreeMemory = 0;
19671966
size_t TotalMemory = 0;
19681967
sycl::detail::pi::assertion(cuMemGetInfo(&FreeMemory, &TotalMemory) ==

0 commit comments

Comments
 (0)