[SYCL][UR] Add partial support for IGCA device query - #23254
KornevNikita wants to merge 3 commits into
Conversation
Spec: intel#23240 Level Zero does not report IGCA yet, so the adapter returns dummy values. A follow-up patch will wire it up once support lands. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ldorau could you please undo changes request if you don't have critical concerns anymore |
Done |
| // TODO: Level Zero does not report IGCA yet. Return dummy values until an | ||
| // extension to zeDeviceGetProperties exposes it. Target 0 and an empty set of | ||
| // feature sets are both invalid, so they can't be mistaken for real values. | ||
| case UR_DEVICE_INFO_IGCA_TARGET: | ||
| return ReturnValue(uint32_t{0}); | ||
| case UR_DEVICE_INFO_IGCA_FEATURE_SET: | ||
| return ReturnValue(ur_device_igca_feature_flags_t{0}); |
There was a problem hiding this comment.
OK, but since Level Zero doesn't report real IGCA data yet, UR_DEVICE_INFO_IGCA_TARGET / UR_DEVICE_INFO_IGCA_FEATURE_SET return UR_RESULT_SUCCESS with dummy 0 / 0 values here. The problem is that has_info_desc() (sycl/source/detail/device_impl.hpp) only checks that the underlying urDeviceGetInfo() call succeeds - it doesn't inspect the returned value. So dev.has(aspect::ext_intel_igca) will unconditionally report true on every L0 GPU today, and an app calling dev.get_info<ext::intel::info::device::igca>() silently gets back Target=0/no feature sets, with no way to tell that from a real (if unlikely) empty result.
Could this return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION instead until Level Zero actually exposes IGCA data? That's the pattern the other adapters (CUDA/HIP/OpenCL/native_cpu) already use for these two queries, and it would make has(aspect::ext_intel_igca) correctly report false on L0 in the meantime.
Adds the
ext_intel_igcadevice query: a new UR device info pair(
UR_DEVICE_INFO_IGCA_TARGET,UR_DEVICE_INFO_IGCA_FEATURE_SET) and the SYCLext::intel::info::device::igcadescriptor returninginfo::igca { level, features },guarded by the new
aspect::ext_intel_igca.Spec: #23240
Level Zero does not report IGCA yet, so the adapter returns dummy values (level 0,
empty feature set), which are both invalid and can't be mistaken for real data.
Other adapters return
UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION, so the aspect isfalse everywhere for now. A follow-up patch will wire it up once
zeDeviceGetPropertiesexposes it;
SYCL_EXT_INTEL_DEVICE_INFOwill be bumped to 11 at that point.UR files under
include/and generated sources were produced by the UR codegenerator from
unified-runtime/scripts/core/device.yml.🤖 Generated with Claude Code