|
58 | 58 | // RUN: %S/Inputs/hip_multiple_inputs/b.hip \
|
59 | 59 | // RUN: 2>&1 | FileCheck -check-prefixes=COMMON,HEX %s
|
60 | 60 |
|
| 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 %s |
| 71 | + |
| 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 %s |
| 82 | + |
61 | 83 | // INVALID: invalid value 'invalid' in '-fuse-cuid=invalid'
|
62 | 84 |
|
63 | 85 | // COMMON: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa"
|
|
92 | 114 | // HEX-NOT: "-cuid=[[CUID]]"
|
93 | 115 | // COMMON-SAME: "-cuid=[[CUID2]]"
|
94 | 116 | // COMMON-SAME: "{{.*}}b.hip"
|
| 117 | + |
| 118 | +// HOST: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu" |
| 119 | +// HOST-SAME: "-cuid=[[CUID:xyz_123]]" |
| 120 | +// HOST-SAME: "{{.*}}a.cu" |
| 121 | + |
| 122 | +// HOST: "-cc1"{{.*}} "-triple" "x86_64-unknown-linux-gnu" |
| 123 | +// HOST-SAME: "-cuid=[[CUID]]" |
| 124 | +// HOST-SAME: "{{.*}}b.hip" |
| 125 | + |
| 126 | +// DEVICE: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa" |
| 127 | +// DEVICE-SAME: "-target-cpu" "gfx900" |
| 128 | +// DEVICE-SAME: "-cuid=[[CUID:xyz_123]]" |
| 129 | +// DEVICE-SAME: "{{.*}}a.cu" |
| 130 | + |
| 131 | +// DEVICE: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa" |
| 132 | +// DEVICE-SAME: "-target-cpu" "gfx900" |
| 133 | +// DEVICE-SAME: "-cuid=[[CUID]]" |
| 134 | +// DEVICE-SAME: "{{.*}}b.hip" |
0 commit comments