Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/API/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class Device {
std::string Description;
std::string DriverName;
std::string DriverVersion;
std::string GPUGeneration;
uint16_t FamilyPrefix = 0;

public:
virtual const Capabilities &getCapabilities() = 0;
Expand Down Expand Up @@ -247,6 +249,8 @@ class Device {
llvm::StringRef getDescription() const { return Description; }
llvm::StringRef getDriverName() const { return DriverName; }
llvm::StringRef getDriverVersion() const { return DriverVersion; }
llvm::StringRef getGPUGeneration() const { return GPUGeneration; }
uint16_t getFamilyPrefix() const { return FamilyPrefix; }
};

llvm::Error
Expand Down
20 changes: 20 additions & 0 deletions lib/API/DX/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,26 @@ class DXDevice : public offloadtest::Device {
Description = std::move(Desc);
DriverVersion = std::move(DriverVer);
DriverName = "DirectX";

DXCoreHardwareID HardwareID;
if (SUCCEEDED(Adapter->GetProperty(DXCoreAdapterProperty::HardwareID,
&HardwareID))) {
// 0x8086 is the Vendor ID for Intel
if (HardwareID.vendorID == 0x8086) {
FamilyPrefix = static_cast<uint16_t>(HardwareID.deviceID) & 0xFF00;
const IntelGpuEra Era =
getIntelGpuEra(static_cast<uint16_t>(HardwareID.deviceID));
if (Era == IntelGpuEra::Gen7_to_10)
GPUGeneration = "Intel Gen7-10";
else if (Era == IntelGpuEra::Gen11_to_14_and_Xe)
GPUGeneration = "Intel Gen11-14/Xe";
else
GPUGeneration = "Intel Unknown";
} else {
// We don't have a need yet to identify other GPU vendors.
GPUGeneration = "Unknown";
}
}
}
DXDevice(const DXDevice &) = delete;
DXDevice &operator=(const DXDevice &) = delete;
Expand Down
24 changes: 24 additions & 0 deletions lib/API/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,27 @@ llvm::Error offloadtest::findAndValidateRenderPassTextureSize(

return llvm::Error::success();
}

offloadtest::IntelGpuEra offloadtest::getIntelGpuEra(uint16_t DeviceId) {
const uint16_t FamilyPrefix = DeviceId & 0xFF00;
switch (FamilyPrefix) {
case 0x5900: // Kaby Lake (7th Gen)
case 0x3E00: // Coffee Lake / Whiskey Lake (8th/9th Gen)
case 0x9B00: // Comet Lake (10th Gen)
case 0x8A00: // Ice Lake (10th Gen)
return IntelGpuEra::Gen7_to_10;
case 0x9A00: // Tiger Lake (11th Gen)
case 0x4C00: // Rocket Lake (11th Gen Desktop)
case 0x4600: // Alder Lake (12th Gen)
case 0xA700: // Raptor Lake (13th Gen)
case 0x7D00: // Meteor Lake (14th Gen Core Ultra)
case 0x5600: // Arc Alchemist (Discrete Xe-HPG)
case 0x4F00: // DG1 (Discrete Xe-LP)
case 0x0B00: // Ponte Vecchio (Xe-HPC / Data Center Max)

@farzonl farzonl Jun 5, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what the family prefix is for Battlemage, so this is unlikely to work on CI. will need help figuring this out.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess based on these docs BattleImage would be E2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case 0x0B00: // Ponte Vecchio (Xe-HPC / Data Center Max)
case 0x0B00: // Ponte Vecchio (Xe-HPC / Data Center Max)
case 0xE200: // Battlemage Discrete
case 0x6400: // Lunar Lake Integrated

case 0xE200: // Battlemage Discrete
case 0x6400: // Lunar Lake Integrated
return IntelGpuEra::Gen11_to_14_and_Xe;
default:
return IntelGpuEra::UnknownOrLegacy;
}
}
5 changes: 4 additions & 1 deletion lib/API/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ llvm::Error findAndValidateRenderPassTextureSize(const RenderPassBeginDesc &,
uint32_t *OutWidth,
uint32_t *OutHeight);

enum class IntelGpuEra { UnknownOrLegacy, Gen7_to_10, Gen11_to_14_and_Xe };

IntelGpuEra getIntelGpuEra(uint16_t deviceId);
} // namespace offloadtest

#endif // OFFLOADTEST_API_UTIL_H
#endif // OFFLOADTEST_API_UTIL_H
17 changes: 17 additions & 0 deletions lib/API/VK/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,22 @@ class VulkanDevice : public offloadtest::Device {
const uint64_t DriverInfoSz =
strnlen(DriverProps.driverInfo, VK_MAX_DRIVER_INFO_SIZE);
DriverVersion = std::string(DriverProps.driverInfo, DriverInfoSz);

// 0x8086 is the Vendor ID for Intel
if (Props.vendorID == 0x8086) {
FamilyPrefix = static_cast<uint16_t>(Props.deviceID) & 0xFF00;
const IntelGpuEra Era =
getIntelGpuEra(static_cast<uint16_t>(Props.deviceID));
if (Era == IntelGpuEra::Gen7_to_10)
GPUGeneration = "Intel Gen7-10";
else if (Era == IntelGpuEra::Gen11_to_14_and_Xe)
GPUGeneration = "Intel Gen11-14/Xe";
else
GPUGeneration = "Intel Unknown";
} else {
// We don't have a need yet to identify other GPU vendors.
GPUGeneration = "Unknown";
}
#if defined(__APPLE__) && defined(__aarch64__)
// Apple silicon Macs may have multiple Vulkan drivers sharing one device
// name. Include the driver name in the description to enable
Expand Down Expand Up @@ -4284,6 +4300,7 @@ llvm::Error offloadtest::initializeVulkanDevices(
return Err;

for (const auto &PDev : PhysicalDevices) {

auto DeviceOrErr = VulkanDevice::create(VulkanInstanceShPtr, PDev,
AvailableInstanceLayers);
if (!DeviceOrErr) {
Expand Down
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_const_single_subscript.i2x3.test
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ DescriptorSets:
# Bug: https://github.com/llvm/offload-test-suite/issues/660
# XFAIL: Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_construct_by_sub_mat.test
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ DescriptorSets:
...
#--- end

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
4 changes: 4 additions & 0 deletions test/Basic/Matrix/matrix_elementwise_cast.test
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ DescriptorSets:
Binding: 3
...
#--- end

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
5 changes: 4 additions & 1 deletion test/Basic/Matrix/matrix_elementwise_vector_cast.test
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/599
# XFAIL: Intel && Vulkan && Clang
# XFAIL: Intel-Gen-10 && Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
Expand Down
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_scalar_arithmetic.test
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ DescriptorSets:
...
#--- end

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o | FileCheck %s
Expand Down
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_scalar_constructor.test
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ DescriptorSets:
...
#--- end

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_single_subscript_basic.i2x3.test
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ DescriptorSets:
# Bug: https://github.com/llvm/offload-test-suite/issues/660
# XFAIL: Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_single_subscript_basic.i3x2.test
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ DescriptorSets:
# Bug: https://github.com/llvm/offload-test-suite/issues/660
# XFAIL: Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
3 changes: 3 additions & 0 deletions test/Basic/Matrix/matrix_single_subscript_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ DescriptorSets:
# Bug: https://github.com/llvm/offload-test-suite/issues/660
# XFAIL: Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
5 changes: 4 additions & 1 deletion test/Basic/Matrix/matrix_trunc_cast.test
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/599
# XFAIL: Intel && Vulkan && Clang
# XFAIL: Intel-Gen-10 && Vulkan && Clang

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
Expand Down
3 changes: 3 additions & 0 deletions test/Feature/CBuffer/Matrix/LayoutKeyword/transpose.test
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ DescriptorSets:
...
#--- end

# Bug https://github.com/microsoft/DirectXShaderCompiler/issues/8473
# XFAIL: Vulkan && DXC

# Task: https://github.com/llvm/wg-hlsl/issues/305
# XFAIL: Clang

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ DescriptorSets:
# Results: [ 1.1, 2.2, 0, 0, 5.5, 6.6, 0, 0 ]
# XFAIL: Vulkan && QC && DXC

# Bug: https://github.com/llvm/offload-test-suite/issues/696
# XFAIL:Intel-Gen-Current && DirectX && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/CBuffer/arrays-16bit.test
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DescriptorSets:
# REQUIRES: Half, Int16

# Bug: https://github.com/llvm/offload-test-suite/issues/933
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# Unimplemented https://github.com/llvm/llvm-project/issues/159602
# XFAIL: Clang && Vulkan
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/CBuffer/scalars-16bit.test
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DescriptorSets:
# XFAIL: QC && Vulkan

# Bug https://github.com/llvm/offload-test-suite/issues/932
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# REQUIRES: Half, Int16

Expand Down
2 changes: 1 addition & 1 deletion test/Feature/CBuffer/vectors-64bit.test
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DescriptorSets:
# REQUIRES: Double, Int64

# Bug: https://github.com/llvm/offload-test-suite/issues/471
# XFAIL: Vulkan && Intel
# XFAIL: Vulkan && Intel-Gen-10

# RUN: split-file %s %t
# RUN: %dxc_target -fvk-use-dx-layout -T cs_6_5 -Fo %t.o %t/source.hlsl
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/any.fp64.test
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/370
# XFAIL: DXC && DirectX && Intel
# XFAIL: DXC && DirectX && Intel-Gen-10

# REQUIRES: Double
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/any.int64.test
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/370
# XFAIL: DXC && DirectX && Intel
# XFAIL: DXC && DirectX && Intel-Gen-10

# REQUIRES: Int64
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/asin.16.test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DescriptorSets:
# so we will not investigate this.
# only fails with DXC so once Gis spirv support is added to Clang I suspect it will
# fail with clang as well.
# XFAIL: Intel && Vulkan && DXC
# XFAIL: Intel-Gen-10 && Vulkan && DXC

# Unimplemented: support for the Gis flag generating the
# SignedZeroInfNanPreserve capability needs to be added to clang
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/asin.32.test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DescriptorSets:
# so we will not investigate this.
# only fails with DXC so once Gis spirv support is added to Clang I suspect it will
# fail with clang as well.
# XFAIL: Intel && Vulkan && DXC
# XFAIL: Intel-Gen-10 && Vulkan && DXC

# Unimplemented: support for the Gis flag generating the
# SignedZeroInfNanPreserve capability needs to be added to clang
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/mul.fp16.test
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/777
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# REQUIRES: Half
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/mul.int16.test
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/777
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# REQUIRES: Int16
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/transpose.fp16.test
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/779
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# REQUIRES: Half
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/HLSLLib/transpose.int16.test
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/779
# XFAIL: Intel && DirectX
# XFAIL: Intel-Gen-10 && DirectX

# REQUIRES: Int16
# RUN: split-file %s %t
Expand Down
3 changes: 3 additions & 0 deletions test/Feature/PushConstant/types_16bit.test
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ DescriptorSets:
#--- end
# UNSUPPORTED: Metal || DirectX
#
# Bug https://github.com/llvm/offload-test-suite/issues/1294
# XFAIL: Vulkan && DXC
#
# min16 not supported.
# XFAIL: Clang

Expand Down
3 changes: 3 additions & 0 deletions test/Feature/ResourcesInStructs/res-of-matrix-in-struct.test
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ DescriptorSets:
# Unimplemented https://github.com/microsoft/DirectXShaderCompiler/issues/8302
# XFAIL: Vulkan && DXC

# Bug https://github.com/llvm/llvm-project/issues/202064
# XFAIL: Vulkan && Clang

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
3 changes: 3 additions & 0 deletions test/Feature/Textures/Texture2D.SRVToUAV.array.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ DescriptorSets:
# Unimplemented https://github.com/llvm/llvm-project/issues/133835
# XFAIL: Clang

# Bug https://github.com/llvm/offload-test-suite/issues/1295
# XFAIL: DXC && Vulkan && Intel-Gen-Current

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
4 changes: 4 additions & 0 deletions test/Feature/Textures/Texture2D.SRVToUAV.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ DescriptorSets:

# Unimplemented: https://github.com/llvm/llvm-project/issues/175630 (for SPIRV)
# XFAIL: Clang

# Bug https://github.com/llvm/offload-test-suite/issues/1295
# XFAIL: DXC && Vulkan && Intel-Gen-Current

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o
2 changes: 1 addition & 1 deletion test/Feature/TypedBuffer/64bit-scalar.test
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/1110
# XFAIL: Intel && Vulkan
# XFAIL: Intel-Gen-10 && Vulkan

# REQUIRES: Int64
# RUN: split-file %s %t
Expand Down
2 changes: 1 addition & 1 deletion test/Feature/TypedBuffer/GetDimensions.test
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DescriptorSets:
#--- end

# Bug https://github.com/llvm/offload-test-suite/issues/469
# XFAIL: Vulkan && Intel
# XFAIL: Vulkan && Intel-Gen-10

# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
Expand Down
Loading
Loading