Skip to content

Commit 9cdcd6a

Browse files
authored
Merge branch 'main' into enable-passing-vk-tests
2 parents a362b42 + 90001b4 commit 9cdcd6a

20 files changed

+210
-48
lines changed

.github/workflows/build-and-test-callable.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,16 @@ jobs:
135135
ref: main
136136
path: golden-images
137137
fetch-depth: 1
138-
- name: Setup Windows
139-
if: inputs.OS == 'windows'
138+
- name: Setup Windows x64
139+
if: inputs.OS == 'windows' && runner.arch != 'ARM64'
140140
uses: llvm/actions/setup-windows@main
141141
with:
142142
arch: amd64
143+
- name: Setup Windows
144+
if: inputs.OS == 'windows' && runner.arch == 'ARM64'
145+
uses: llvm/actions/setup-windows@main
146+
with:
147+
arch: arm64
143148
- name: Detect Clang
144149
id: Test-Clang
145150
shell: bash

.github/workflows/pr-matrix.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
fail-fast: false
5151
matrix:
52-
SKU: [windows-nvidia, windows-amd]
52+
SKU: [windows-nvidia, windows-amd, windows-qc]
5353
TestTarget: [check-hlsl-d3d12, check-hlsl-vk, check-hlsl-clang-d3d12, check-hlsl-clang-vk]
5454

5555
uses: ./.github/workflows/build-and-test-callable.yaml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Windows D3D12 AMD Clang
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-D3D12-AMD-Clang:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
TestTarget: check-hlsl-clang-d3d12
19+
OffloadTest-branch: ${{ github.ref }}
20+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Windows Vulkan AMD Clang
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-VK-AMD-Clang:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
TestTarget: check-hlsl-clang-vk
19+
OffloadTest-branch: ${{ github.ref }}
20+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Windows D3D12 Warp Clang
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-D3D12-Warp-Clang:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
TestTarget: check-hlsl-clang-warp-d3d12
19+
OffloadTest-branch: ${{ github.ref }}
20+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Windows D3D12 AMD DXC
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-D3D12-AMD-DXC:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
BuildType: Debug
19+
TestTarget: check-hlsl-d3d12
20+
OffloadTest-branch: ${{ github.ref }}
21+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Windows Vulkan AMD DXC
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-VK-AMD-DXC:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
BuildType: Debug
19+
TestTarget: check-hlsl-vk
20+
OffloadTest-branch: ${{ github.ref }}
21+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Windows D3D12 Warp DXC
2+
3+
permissions:
4+
contents: read
5+
checks: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 */2 * * *' # run every 2 hours
11+
12+
jobs:
13+
Windows-D3D12-Warp-DXC:
14+
uses: ./.github/workflows/build-and-test-callable.yaml
15+
with:
16+
OS: windows
17+
SKU: windows-amd
18+
BuildType: Debug
19+
TestTarget: check-hlsl-warp-d3d12
20+
OffloadTest-branch: ${{ github.ref }}
21+
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ Experimental Runtime test suite for HLSL
88
| Windows DirectX12 AMD GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-d3d12.yaml/badge.svg) |
99
| Windows DirectX12 Intel GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-clang-d3d12.yaml/badge.svg) |
1010
| Windows DirectX12 NVIDIA GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-clang-d3d12.yaml/badge.svg) |
11-
| Windows DirectX12 Warp (LKG) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-d3d12.yaml/badge.svg) |
11+
| Windows DirectX12 Qualcomm GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-clang-d3d12.yaml/badge.svg) |
12+
| Windows DirectX12 Warp (x64 LKG) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-d3d12.yaml/badge.svg) |
13+
| Windows DirectX12 Warp (arm64 LKG) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-dxc-warp-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-clang-warp-d3d12.yaml/badge.svg) |
1214
| Windows DirectX12 Warp (1.0.15-preview) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-preview-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-preview-d3d12.yaml/badge.svg) |
1315
| Windows Vulkan AMD GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-vk.yaml/badge.svg) |
1416
| Windows Vulkan Intel GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-clang-vk.yaml/badge.svg) |
1517
| Windows Vulkan NVIDIA GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-clang-vk.yaml/badge.svg) |
18+
| Windows Vulkan Qualcomm GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-qc-clang-vk.yaml/badge.svg) |
1619
| macOS Apple M1 | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/macos-dxc-mtl.yaml/badge.svg) | ![Clang & DXC](https://github.com/llvm/offload-test-suite/actions/workflows/macos-clang-mtl.yaml/badge.svg) |
1720

1821

include/API/Device.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace offloadtest {
3030

3131
struct Pipeline;
3232

33+
struct DeviceConfig {
34+
bool EnableDebugLayer = false;
35+
bool EnableValidationLayer = false;
36+
};
37+
3338
class Device {
3439
protected:
3540
std::string Description;
@@ -46,7 +51,7 @@ class Device {
4651
llvm::StringRef getDescription() const { return Description; }
4752

4853
static void registerDevice(std::shared_ptr<Device> D);
49-
static llvm::Error initialize();
54+
static llvm::Error initialize(const DeviceConfig Config);
5055
static void uninitialize();
5156

5257
using DeviceArray = llvm::SmallVector<std::shared_ptr<Device>>;
@@ -58,16 +63,16 @@ class Device {
5863
static inline DeviceRange devices() { return DeviceRange(begin(), end()); }
5964

6065
#ifdef OFFLOADTEST_ENABLE_D3D12
61-
static llvm::Error initializeDXDevices();
66+
static llvm::Error initializeDXDevices(const DeviceConfig Config);
6267
#endif
6368

6469
#ifdef OFFLOADTEST_ENABLE_VULKAN
65-
static llvm::Error initializeVKDevices();
70+
static llvm::Error initializeVKDevices(const DeviceConfig Config);
6671
static void cleanupVKDevices();
6772
#endif
6873

6974
#ifdef OFFLOADTEST_ENABLE_METAL
70-
static llvm::Error initializeMtlDevices();
75+
static llvm::Error initializeMtlDevices(const DeviceConfig Config);
7176
#endif
7277
};
7378

0 commit comments

Comments
 (0)