File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ def get_extra_env(sycl_devices):
337337 backend , device = parsed_dev_name .split (":" , 1 )
338338 device_selector = parsed_dev_name
339339 if backend == "level_zero" and device .isdigit ():
340+ # level_zero:0 maps to a selector for the first GPU, so pin
341+ # execution to the requested device via ZE_AFFINITY_MASK.
340342 extra_env .append (f"ZE_AFFINITY_MASK={ device } " )
341343 device_selector = f"{ backend } :0"
342344
Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ def remove_level_zero_suffix(devices):
706706available_devices = {
707707 "opencl" : ("cpu" , "gpu" , "fpga" ),
708708 "cuda" : "gpu" ,
709- "level_zero" : ( "gpu" , "0" , "1" ) ,
709+ "level_zero" : "gpu" ,
710710 "hip" : "gpu" ,
711711 "native_cpu" : "cpu" ,
712712 "offload" : "gpu" ,
You can’t perform that action at this time.
0 commit comments