diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index a36e8cc118adb..0c0aad8e49e07 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -143,7 +143,7 @@ jobs: image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN target_devices: level_zero:gpu;opencl:gpu reset_intel_gpu: true - extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + extra_lit_opts: --param matrix-xmx8=True env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' - name: E2E tests with dev igc on Intel Arc A-Series Graphics runner: '["Linux", "arc"]' @@ -151,7 +151,7 @@ jobs: image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN target_devices: level_zero:gpu;opencl:gpu reset_intel_gpu: true - extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + extra_lit_opts: --param matrix-xmx8=True env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' use_igc_dev: true - name: E2E tests on Intel Ponte Vecchio GPU diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index c932eca36c4ff..27640e5102b2a 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -58,7 +58,6 @@ jobs: target_devices: level_zero:gpu reset_intel_gpu: true tests_selector: e2e - extra_lit_opts: --param gpu-intel-gen12=True - name: Intel OCL GPU runner: '["Linux", "gen12"]' @@ -67,7 +66,6 @@ jobs: target_devices: opencl:gpu reset_intel_gpu: true tests_selector: e2e - extra_lit_opts: --param gpu-intel-gen12=True - name: OCL CPU (AMD) runner: '["Linux", "amdgpu"]' @@ -126,7 +124,6 @@ jobs: name: Intel GEN12 Graphics with Level Zero runner: '["Windows","gen12"]' sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }} - extra_lit_opts: --param gpu-intel-gen12=True cuda-aws-start: needs: [ubuntu2204_build] diff --git a/.github/workflows/sycl-post-commit.yml b/.github/workflows/sycl-post-commit.yml index 730a8334ffdd2..b7d1f531b8a25 100644 --- a/.github/workflows/sycl-post-commit.yml +++ b/.github/workflows/sycl-post-commit.yml @@ -47,12 +47,11 @@ jobs: include: - name: Intel GEN12 Graphics with Level Zero runner: '["Linux", "gen12"]' - extra_lit_opts: --param gpu-intel-gen12=True target_devices: level_zero:gpu;opencl:fpga reset_intel_gpu: true - name: Intel Arc A-Series Graphics with Level Zero runner: '["Linux", "arc"]' - extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + extra_lit_opts: --param matrix-xmx8=True reset_intel_gpu: true - name: AMD/HIP runner: '["Linux", "amdgpu"]' @@ -69,7 +68,7 @@ jobs: - name: Perf tests on Intel GEN12 Graphics system runner: '["Linux", "gen12"]' env: '{"LIT_FILTER":"PerformanceTests/"}' - extra_lit_opts: -a -j 1 --param enable-perf-tests=True --param gpu-intel-gen12=True + extra_lit_opts: -a -j 1 --param enable-perf-tests=True target_devices: all reset_intel_gpu: true - name: Perf tests on Intel Arc A-Series Graphics system @@ -120,7 +119,6 @@ jobs: name: Intel GEN12 Graphics with Level Zero runner: '["Windows","gen12"]' sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }} - extra_lit_opts: --param gpu-intel-gen12=True compiler: icx macos_default: diff --git a/.github/workflows/sycl-windows-precommit.yml b/.github/workflows/sycl-windows-precommit.yml index a82c2b7814d75..ccd10950b3da2 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -55,4 +55,3 @@ jobs: name: Intel GEN12 Graphics with Level Zero runner: '["Windows","gen12"]' sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} - extra_lit_opts: --param gpu-intel-gen12=True diff --git a/sycl/test-e2e/README.md b/sycl/test-e2e/README.md index 4dbb7941697d7..396aa9ef7341a 100644 --- a/sycl/test-e2e/README.md +++ b/sycl/test-e2e/README.md @@ -239,6 +239,12 @@ environment: * **arch-\** - [SYCL architecture](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_device_architecture.asciidoc) of a device (e.g. `arch-intel_gpu_pvc`, the name matches what you can pass into `-fsycl-targets` compiler flag); +* **gpu-intel-dg2** - Intel GPU DG2 availability; Automatically set if device + architecture belongs to DG2 family; +* **gpu-intel-gen11** - Intel GPU Gen11 availability; Automatically set if device + architecture belongs to Gen11 family; +* **gpu-intel-gen12** - Intel GPU Gen12 availability; Automatically set if device + architecture belongs to Gen12 family; #### Manually-set features @@ -247,17 +253,9 @@ section below). All these features are related to HW detection and they should be considered deprecated, because we have HW auto-detection functionality in place. No new tests should use these features: -* **gpu-intel-gen11** - Intel GPU Gen11 availability; -* **gpu-intel-gen12** - Intel GPU Gen12 availability; -* **gpu-intel-dg2** - Intel GPU DG2 availability; * **gpu-intel-pvc** - Intel GPU PVC availability; * **gpu-intel-pvc-vg** - Intel GPU PVC-VG availability; -Note: some of those features describing whole GPU families and auto-detection of -HW does not provide this functionality at the moment. As an improvement, we -could add those features even with auto-detection, because the only alternative -at the moment is to explicitly list every architecture from a family. - ### llvm-lit parameters Following options can be passed to llvm-lit tool through --param option to diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index 01ef83b825124..d723d3452b7d6 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -176,6 +176,31 @@ if lit_config.params.get("igc-dev", False): config.available_features.add("igc-dev") +# Map between device family and architecture types. +device_family_arch_map = { + # : Set of architectures types (and aliases) + # DG2 + "gpu-intel-dg2": { + "intel_gpu_acm_g12", + "intel_gpu_dg2_g12", + "intel_gpu_acm_g11", + "intel_gpu_dg2_g11", + "intel_gpu_acm_g10", + "intel_gpu_dg2_g10", + }, + # Gen12 + "gpu-intel-gen12": {"intel_gpu_tgllp", "intel_gpu_tgl"}, + # Gen11 + "gpu-intel-gen11": {"intel_gpu_icllp", "intel_gpu_icl"}, +} + + +def get_device_family_from_arch(arch): + for device_family, arch_set in device_family_arch_map.items(): + if arch in arch_set: + return device_family + return None + def check_igc_tag_and_add_feature(): if os.path.isfile(config.igc_tag_file): with open(config.igc_tag_file, "r") as tag_file: @@ -773,10 +798,27 @@ def open_check_file(file_name): aspect_features = set("aspect-" + a for a in aspects) sg_size_features = set("sg-" + s for s in sg_sizes) architecture_feature = set("arch-" + s for s in architectures) + # Add device family features like intel-gpu-gen12, intel-gpu-dg2 based on + # the architecture reported by sycl-ls. + device_family = set( + get_device_family_from_arch(arch) + for arch in architectures + if get_device_family_from_arch(arch) is not None + ) + + # Print the detected GPU family name. + if len(device_family) > 0: + lit_config.note( + "Detected GPU family for {}: {}".format( + sycl_device, ", ".join(device_family) + ) + ) + features = set() features.update(aspect_features) features.update(sg_size_features) features.update(architecture_feature) + features.update(device_family) be, dev = sycl_device.split(":") features.add(dev.replace("fpga", "accelerator"))