Skip to content

Commit 881f4ab

Browse files
committed
add api-query fro family prefix. limit family prefix to intel for now. updte test cases for updated xfail
1 parent d577844 commit 881f4ab

22 files changed

Lines changed: 27 additions & 19 deletions

include/API/Device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ class Device {
191191
std::string DriverName;
192192
std::string DriverVersion;
193193
std::string GPUGeneration;
194+
uint16_t FamilyPrefix = 0;
194195

195196
public:
196197
virtual const Capabilities &getCapabilities() = 0;
@@ -232,6 +233,8 @@ class Device {
232233
llvm::StringRef getDescription() const { return Description; }
233234
llvm::StringRef getDriverName() const { return DriverName; }
234235
llvm::StringRef getDriverVersion() const { return DriverVersion; }
236+
llvm::StringRef getGPUGeneration() const { return GPUGeneration; }
237+
uint16_t getFamilyPrefix() const { return FamilyPrefix; }
235238
};
236239

237240
llvm::Error

lib/API/DX/Device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ class DXDevice : public offloadtest::Device {
10031003
&HardwareID))) {
10041004
// 0x8086 is the Vendor ID for Intel
10051005
if (HardwareID.vendorID == 0x8086) {
1006+
FamilyPrefix = static_cast<uint16_t>(HardwareID.deviceID) & 0xFF00;
10061007
const IntelGpuEra Era =
10071008
getIntelGpuEra(static_cast<uint16_t>(HardwareID.deviceID));
10081009
if (Era == IntelGpuEra::Gen7_to_10)

lib/API/VK/Device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,7 @@ class VulkanDevice : public offloadtest::Device {
13841384

13851385
// 0x8086 is the Vendor ID for Intel
13861386
if (Props.vendorID == 0x8086) {
1387+
FamilyPrefix = static_cast<uint16_t>(Props.deviceID) & 0xFF00;
13871388
const IntelGpuEra Era =
13881389
getIntelGpuEra(static_cast<uint16_t>(Props.deviceID));
13891390
if (Era == IntelGpuEra::Gen7_to_10)

test/Basic/Matrix/matrix_const_single_subscript.i2x3.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ DescriptorSets:
9696
# XFAIL: Vulkan && Clang
9797

9898
# Bug: https://github.com/llvm/offload-test-suite/issues/696
99-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
99+
# XFAIL:Intel-Gen-Current && DirectX && Clang
100100

101101
# RUN: split-file %s %t
102102
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_construct_by_sub_mat.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ DescriptorSets:
6262
#--- end
6363

6464
# Bug: https://github.com/llvm/offload-test-suite/issues/696
65-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
65+
# XFAIL:Intel-Gen-Current && DirectX && Clang
6666

6767
# RUN: split-file %s %t
6868
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_elementwise_cast.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ DescriptorSets:
100100
#--- end
101101

102102
# Bug: https://github.com/llvm/offload-test-suite/issues/696
103-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
103+
# XFAIL:Intel-Gen-Current && DirectX && Clang
104104

105105
# RUN: split-file %s %t
106106
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_elementwise_vector_cast.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ DescriptorSets:
7676
# XFAIL: Intel && Vulkan && Clang
7777

7878
# Bug: https://github.com/llvm/offload-test-suite/issues/696
79-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
79+
# XFAIL:Intel-Gen-Current && DirectX && Clang
8080

8181
# RUN: split-file %s %t
8282
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_scalar_arithmetic.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ DescriptorSets:
8383
#--- end
8484

8585
# Bug: https://github.com/llvm/offload-test-suite/issues/696
86-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
86+
# XFAIL:Intel-Gen-Current && DirectX && Clang
8787

8888
# RUN: split-file %s %t
8989
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_scalar_constructor.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ DescriptorSets:
5656
#--- end
5757

5858
# Bug: https://github.com/llvm/offload-test-suite/issues/696
59-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
59+
# XFAIL:Intel-Gen-Current && DirectX && Clang
6060

6161
# RUN: split-file %s %t
6262
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Basic/Matrix/matrix_single_subscript_basic.i2x3.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ DescriptorSets:
9696
# XFAIL: Vulkan && Clang
9797

9898
# Bug: https://github.com/llvm/offload-test-suite/issues/696
99-
# XFAIL: Intel-Modern-GPU && DirectX && Clang
99+
# XFAIL:Intel-Gen-Current && DirectX && Clang
100100

101101
# RUN: split-file %s %t
102102
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

0 commit comments

Comments
 (0)