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
71 lines
6.1 KiB
C++
71 lines
6.1 KiB
C++
// RUN: %clang_cc1 -triple aarch64 -verify=unsupported -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple loongarch64 -verify=loongarch64 -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple mips64 -verify=unsupported -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple powerpc64 -verify=unsupported -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple riscv64 -verify=unsupported -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple x86_64 -verify=x86_64 -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple nvptx64-unknown-cuda -fcuda-is-device -x cuda -verify=ignored -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple amdgcn -verify=ignored -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple r600 -verify=ignored -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple spirv-linux-vulkan-library -verify=ignored -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple spirv32-unknown-unknown -verify=ignored -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple spirv64-unknown-unknown -verify=ignored -fsyntax-only %s
|
|
|
|
// RUN: %clang_cc1 -triple x86_64 -aux-triple nvptx64 -x cuda -verify=x86_64 -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple nvptx64 -aux-triple x86_64 -x cuda -fcuda-is-device -verify=nvptx64-x86_64 -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple aarch64 -aux-triple nvptx64 -x cuda -verify=unsupported -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple nvptx64 -aux-triple aarch64 -x cuda -fcuda-is-device -verify=nvptx64-unsupported -fsyntax-only %s
|
|
|
|
#if (defined(__loongarch__) || defined(__x86_64__)) && !__has_attribute(model)
|
|
#error "Should support model attribute"
|
|
#endif
|
|
|
|
int a __attribute((model("tiny"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// loongarch64-error {{code model 'tiny' is not supported on this target}} \
|
|
// x86_64-error {{code model 'tiny' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'tiny' is not supported on this target}}
|
|
int b __attribute((model("small"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// loongarch64-error {{code model 'small' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}}
|
|
int c __attribute((model("normal"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// x86_64-error {{code model 'normal' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'normal' is not supported on this target}}
|
|
int d __attribute((model("kernel"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// loongarch64-error {{code model 'kernel' is not supported on this target}} \
|
|
// x86_64-error {{code model 'kernel' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'kernel' is not supported on this target}}
|
|
int e __attribute((model("medium"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// x86_64-error {{code model 'medium' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'medium' is not supported on this target}}
|
|
int f __attribute((model("large"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// loongarch64-error {{code model 'large' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}}
|
|
int g __attribute((model("extreme"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// x86_64-error {{code model 'extreme' is not supported on this target}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'extreme' is not supported on this target}}
|
|
|
|
void __attribute((model("extreme"))) h() {} // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// ignored-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// loongarch64-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// x86_64-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// nvptx64-unsupported-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// nvptx64-x86_64-error {{'model' attribute only applies to non-TLS global variables}}
|
|
|
|
#if !defined(__CUDA__) || !defined(__CUDA_ARCH__)
|
|
// if we are compiling for non-cuda host, or host mode in a CUDA compile
|
|
#if !defined(__AMDGCN__) && !defined(__R600__) && !defined(__SPIRV__)
|
|
// for all non-cuda hosts, above targets don't support thread_local
|
|
thread_local
|
|
#endif
|
|
#endif
|
|
int i __attribute((model("extreme"))); // unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// loongarch64-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// x86_64-error {{'model' attribute only applies to non-TLS global variables}} \
|
|
// nvptx64-unsupported-warning {{unknown attribute 'model' ignored}} \
|
|
// nvptx64-x86_64-error {{code model 'extreme' is not supported on this target}}
|