Skip to content

Commit 5593d84

Browse files
committed
Fix CUDA build
1 parent bbf7931 commit 5593d84

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/adapters/cuda/kernel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetSuggestedLocalWorkSize(
395395
UR_ASSERT(pSuggestedLocalWorkSize != nullptr,
396396
UR_RESULT_ERROR_INVALID_NULL_POINTER);
397397

398-
ur_context_handle_t Context = hQueue->getContext();
399398
ur_device_handle_t Device = hQueue->Device;
400399
ur_result_t Result = UR_RESULT_SUCCESS;
401400
size_t ThreadsPerBlock[3] = {};
402401

403402
// Set the active context here as guessLocalWorkSize needs an active context
404-
ScopedContext Active(Context);
403+
ScopedContext Active(Device);
405404

406405
guessLocalWorkSize(Device, ThreadsPerBlock, pGlobalWorkSize, workDim,
407406
hKernel);

0 commit comments

Comments
 (0)