Skip to content

Commit a1566dd

Browse files
author
Hugh Delaney
committed
Return device for get info
Not the device index.
1 parent 46f76ff commit a1566dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/adapters/cuda/program.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ urProgramGetInfo(ur_program_handle_t hProgram, ur_program_info_t propName,
374374
case UR_PROGRAM_INFO_NUM_DEVICES:
375375
return ReturnValue(1u);
376376
case UR_PROGRAM_INFO_DEVICES:
377-
return ReturnValue(
378-
static_cast<uint32_t>(hProgram->getDevice()->getIndex()));
377+
return ReturnValue(&hProgram->Device, 1);
379378
case UR_PROGRAM_INFO_SOURCE:
380379
return ReturnValue(hProgram->Binary);
381380
case UR_PROGRAM_INFO_BINARY_SIZES:

0 commit comments

Comments
 (0)