CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
52 lines
2.1 KiB
Common Lisp
52 lines
2.1 KiB
Common Lisp
// REQUIRES: amdgpu-registered-target
|
|
|
|
// Test that by default, AMDGPU functions only emit delta target-features
|
|
// (features that differ from the target CPU's defaults). This reduces IR bloat.
|
|
|
|
// Default behavior for gfx90a: test_default has no target-features,
|
|
// test_explicit_attr has only the delta (+gfx11-insts).
|
|
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx90a -emit-llvm -o - %s | FileCheck --check-prefix=GFX90A %s
|
|
|
|
// With -target-feature, both functions get the delta feature.
|
|
// gfx1030 defaults to wavefrontsize32, so +wavefrontsize64 is a delta.
|
|
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1030 -target-feature +wavefrontsize64 -emit-llvm -o - %s | FileCheck --check-prefix=CMDLINE %s
|
|
|
|
// GFX90A-LABEL: define {{.*}} @test_default()
|
|
// GFX90A-SAME: #[[ATTR_DEFAULT:[0-9]+]]
|
|
// GFX90A-LABEL: define {{.*}} @test_explicit_attr()
|
|
// GFX90A-SAME: #[[ATTR_EXPLICIT:[0-9]+]]
|
|
//
|
|
// test_default should have target-cpu but NO target-features
|
|
// GFX90A: attributes #[[ATTR_DEFAULT]] = {
|
|
// GFX90A-SAME: "target-cpu"="gfx90a"
|
|
// GFX90A-NOT: "target-features"
|
|
// GFX90A-SAME: }
|
|
//
|
|
// test_explicit_attr should have target-cpu and ONLY the delta target-features
|
|
// GFX90A: attributes #[[ATTR_EXPLICIT]] = {
|
|
// GFX90A-SAME: "target-cpu"="gfx90a"
|
|
// GFX90A-SAME: "target-features"="+gfx11-insts"
|
|
// GFX90A-SAME: }
|
|
|
|
// With -target-feature +wavefrontsize64, test_default gets just that delta,
|
|
// test_explicit_attr gets both +gfx11-insts and +wavefrontsize64.
|
|
// CMDLINE-LABEL: define {{.*}} @test_default()
|
|
// CMDLINE-SAME: #[[ATTR_DEFAULT:[0-9]+]]
|
|
// CMDLINE-LABEL: define {{.*}} @test_explicit_attr()
|
|
// CMDLINE-SAME: #[[ATTR_EXPLICIT:[0-9]+]]
|
|
//
|
|
// CMDLINE: attributes #[[ATTR_DEFAULT]] = {
|
|
// CMDLINE-SAME: "target-cpu"="gfx1030"
|
|
// CMDLINE-SAME: "target-features"="+wavefrontsize64"
|
|
// CMDLINE-SAME: }
|
|
//
|
|
// CMDLINE: attributes #[[ATTR_EXPLICIT]] = {
|
|
// CMDLINE-SAME: "target-cpu"="gfx1030"
|
|
// CMDLINE-SAME: "target-features"="{{[^"]*}}+gfx11-insts{{[^"]*}}+wavefrontsize64{{[^"]*}}"
|
|
// CMDLINE-SAME: }
|
|
|
|
kernel void test_default() {}
|
|
|
|
__attribute__((target("gfx11-insts")))
|
|
void test_explicit_attr() {}
|