brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · 78c391c Raw
156 lines · plain
1// Check invalid -fuse-cuid= option.2 3// RUN: not %clang -### -x hip \4// RUN:   --target=x86_64-unknown-linux-gnu \5// RUN:   --no-offload-new-driver \6// RUN:   --offload-arch=gfx900 \7// RUN:   --offload-arch=gfx906 \8// RUN:   -c -nogpuinc -nogpulib -fuse-cuid=invalid \9// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \10// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \11// RUN: 2>&1 | FileCheck -check-prefixes=INVALID %s12 13// Check random CUID generator.14 15// RUN: %clang -### -x hip \16// RUN:   --target=x86_64-unknown-linux-gnu \17// RUN:   --no-offload-new-driver \18// RUN:   --offload-arch=gfx900 \19// RUN:   --offload-arch=gfx906 \20// RUN:   -c -nogpuinc -nogpulib -fuse-cuid=random \21// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \22// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \23// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,HEX %s24 25// Check fixed CUID.26 27// RUN: %clang -### -x hip \28// RUN:   --target=x86_64-unknown-linux-gnu \29// RUN:   --no-offload-new-driver \30// RUN:   --offload-arch=gfx900 \31// RUN:   --offload-arch=gfx906 \32// RUN:   -c -nogpuinc -nogpulib -cuid=xyz_123 \33// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \34// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \35// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,FIXED %s36 37// Check fixed CUID override -fuse-cuid.38 39// RUN: %clang -### -x hip \40// RUN:   --target=x86_64-unknown-linux-gnu \41// RUN:   --no-offload-new-driver \42// RUN:   --offload-arch=gfx900 \43// RUN:   --offload-arch=gfx906 \44// RUN:   -c -nogpuinc -nogpulib -fuse-cuid=random -cuid=xyz_123 \45// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \46// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \47// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,FIXED %s48 49// Check hash CUID generator.50 51// RUN: %clang -### -x hip \52// RUN:   --target=x86_64-unknown-linux-gnu \53// RUN:   --no-offload-new-driver \54// RUN:   --offload-arch=gfx900 \55// RUN:   --offload-arch=gfx906 \56// RUN:   -c -nogpuinc -nogpulib -fuse-cuid=hash \57// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \58// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \59// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,HEX %s60 61// Check that cuid is propagated to the host-only compilation.62// RUN: %clang -### -x hip \63// RUN:   --target=x86_64-unknown-linux-gnu \64// RUN:   --no-offload-new-driver \65// RUN:   --offload-arch=gfx900 \66// RUN:   --offload-host-only \67// RUN:   -c -nogpuinc -nogpulib -cuid=xyz_123 \68// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \69// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \70// RUN: 2>&1 | FileCheck -check-prefixes=HOST %s71 72// Check that cuid is propagated to the device-only compilation.73// RUN: %clang -### -x hip \74// RUN:   --target=x86_64-unknown-linux-gnu \75// RUN:   --no-offload-new-driver \76// RUN:   --offload-arch=gfx900 \77// RUN:   --offload-device-only \78// RUN:   -c -nogpuinc -nogpulib -cuid=xyz_123 \79// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \80// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \81// RUN: 2>&1 | FileCheck -check-prefixes=DEVICE %s82 83// Check cuid is supported by the new driver.84// RUN: %clang -### -x hip \85// RUN:   --target=x86_64-unknown-linux-gnu \86// RUN:   --no-offload-new-driver \87// RUN:   --offload-arch=gfx900 \88// RUN:   --offload-arch=gfx906 \89// RUN:   -c -nogpuinc -nogpulib --offload-new-driver \90// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \91// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \92// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,HEX %s93 94// Check cuid is supported by CUDA by the default new driver.95// RUN: %clang -### -x cu \96// RUN:   --target=x86_64-unknown-linux-gnu \97// RUN:   --offload-arch=sm_60 \98// RUN:   --offload-arch=sm_70 \99// RUN:   -c -nogpuinc -nogpulib \100// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \101// RUN:   %S/Inputs/hip_multiple_inputs/b.hip \102// RUN: 2>&1 | FileCheck -check-prefixes=COMMON,HEX %s103 104// INVALID: invalid value 'invalid' in '-fuse-cuid=invalid'105 106// COMMON: "-cc1"{{.*}} "-triple" "[[TRIP:(amdgcn-amd-amdhsa|nvptx64-nvidia-cuda)]]"107// COMMON-SAME: "-target-cpu" "[[G1:(gfx900|sm_60)]]"108// HEX-SAME: "-cuid=[[CUID:[0-9a-f]+]]"109// FIXED-SAME: "-cuid=[[CUID:xyz_123]]"110// COMMON-SAME: "{{.*}}a.cu"111 112// COMMON: "-cc1"{{.*}} "-triple" "[[TRIP]]"113// COMMON-SAME: "-target-cpu" "[[G2:(gfx906|sm_70)]]"114// COMMON-SAME: "-cuid=[[CUID]]"115// COMMON-SAME: "{{.*}}a.cu"116 117// COMMON: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu"118// COMMON-SAME: "-cuid=[[CUID]]"119// COMMON-SAME: "{{.*}}a.cu"120 121// COMMON: "-cc1"{{.*}} "-triple" "[[TRIP]]"122// COMMON-SAME: "-target-cpu" "[[G1]]"123// HEX-NOT: "-cuid=[[CUID]]"124// HEX-SAME: "-cuid=[[CUID2:[0-9a-f]+]]"125// FIXED-SAME: "-cuid=[[CUID2:xyz_123]]"126// COMMON-SAME: "{{.*}}b.hip"127 128// COMMON: "-cc1"{{.*}} "-triple" "[[TRIP]]"129// COMMON-SAME: "-target-cpu" "[[G2]]"130// HEX-NOT: "-cuid=[[CUID]]"131// COMMON-SAME: "-cuid=[[CUID2]]"132// COMMON-SAME: "{{.*}}b.hip"133 134// COMMON: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu"135// HEX-NOT: "-cuid=[[CUID]]"136// COMMON-SAME: "-cuid=[[CUID2]]"137// COMMON-SAME: "{{.*}}b.hip"138 139// HOST: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu"140// HOST-SAME: "-cuid=[[CUID:xyz_123]]"141// HOST-SAME: "{{.*}}a.cu"142 143// HOST: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu"144// HOST-SAME: "-cuid=[[CUID]]"145// HOST-SAME: "{{.*}}b.hip"146 147// DEVICE: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"148// DEVICE-SAME: "-target-cpu" "gfx900"149// DEVICE-SAME: "-cuid=[[CUID:xyz_123]]"150// DEVICE-SAME: "{{.*}}a.cu"151 152// DEVICE: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"153// DEVICE-SAME: "-target-cpu" "gfx900"154// DEVICE-SAME: "-cuid=[[CUID]]"155// DEVICE-SAME: "{{.*}}b.hip"156