|
219 | 219 | // RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \
|
220 | 220 | // RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only 2>&1 \
|
221 | 221 | // RUN: | FileCheck -check-prefixes=DBIN %s
|
| 222 | +// |
| 223 | +// Test single gpu architecture with complete compilation in device-only |
| 224 | +// compilation mode with an unused host linker flag. |
| 225 | +// |
| 226 | +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ |
| 227 | +// RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only -Wl,--disable-new-dtags 2>&1 \ |
| 228 | +// RUN: | FileCheck -check-prefixes=DBIN %s |
| 229 | + |
222 | 230 | // DBIN-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]])
|
223 | 231 | // DBIN-DAG: [[P1:[0-9]+]]: preprocessor, {[[P0]]}, [[T]]-cpp-output, (device-[[T]], [[ARCH]])
|
224 | 232 | // DBIN-DAG: [[P2:[0-9]+]]: compiler, {[[P1]]}, ir, (device-[[T]], [[ARCH]])
|
|
229 | 237 | // DBIN-DAG: [[P7:[0-9]+]]: linker, {[[P6]]}, hip-fatbin, (device-hip, )
|
230 | 238 | // DBIN-DAG: [[P8:[0-9]+]]: offload, "device-[[T]] (amdgcn-amd-amdhsa:)" {[[P7]]}, hip-fatbin
|
231 | 239 | // DBIN-NOT: host
|
| 240 | + |
232 | 241 | //
|
233 | 242 | // Test single gpu architecture up to the assemble phase in device-only
|
234 | 243 | // compilation mode.
|
|
251 | 260 | // RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \
|
252 | 261 | // RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only -fhip-emit-relocatable 2>&1 \
|
253 | 262 | // RUN: | FileCheck -check-prefixes=RELOC %s
|
| 263 | +// |
| 264 | +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ |
| 265 | +// RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only -fhip-emit-relocatable -Wl,--disable-new-dtags \ |
| 266 | +// RUN: 2>&1 | FileCheck -check-prefixes=RELOC %s |
| 267 | +// |
254 | 268 | // RELOC-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]])
|
255 | 269 | // RELOC-DAG: [[P1:[0-9]+]]: preprocessor, {[[P0]]}, [[T]]-cpp-output, (device-[[T]], [[ARCH]])
|
256 | 270 | // RELOC-DAG: [[P2:[0-9]+]]: compiler, {[[P1]]}, ir, (device-[[T]], [[ARCH]])
|
257 | 271 | // RELOC-DAG: [[P3:[0-9]+]]: backend, {[[P2]]}, assembler, (device-[[T]], [[ARCH]])
|
258 | 272 | // RELOC-DAG: [[P4:[0-9]+]]: assembler, {[[P3]]}, object, (device-[[T]], [[ARCH]])
|
259 | 273 | // RELOC-NOT: linker
|
260 | 274 | // RELOC-DAG: [[P5:[0-9]+]]: offload, "device-[[T]] (amdgcn-amd-amdhsa:[[ARCH]])" {[[P4]]}, object
|
| 275 | +// RELOC-NOT: host |
261 | 276 |
|
262 | 277 | //
|
263 | 278 | // Test two gpu architectures with compile to relocatable in device-only
|
|
266 | 281 | // RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \
|
267 | 282 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-device-only -fhip-emit-relocatable 2>&1 \
|
268 | 283 | // RUN: | FileCheck -check-prefixes=RELOC2 %s
|
| 284 | +// |
| 285 | +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ |
| 286 | +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-device-only -fhip-emit-relocatable \ |
| 287 | +// RUN: -Wl,--disable-new-dtags 2>&1 | FileCheck -check-prefixes=RELOC2 %s |
| 288 | +// |
269 | 289 | // RELOC2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]])
|
270 | 290 | // RELOC2-DAG: [[P1:[0-9]+]]: preprocessor, {[[P0]]}, [[T]]-cpp-output, (device-[[T]], [[ARCH]])
|
271 | 291 | // RELOC2-DAG: [[P2:[0-9]+]]: compiler, {[[P1]]}, ir, (device-[[T]], [[ARCH]])
|
|
280 | 300 | // RELOC2-DAG: [[P10:[0-9]+]]: assembler, {[[P9]]}, object, (device-[[T]], [[ARCH2]])
|
281 | 301 | // RELOC2-NOT: linker
|
282 | 302 | // RELOC2-DAG: [[P11:[0-9]+]]: offload, "device-[[T]] (amdgcn-amd-amdhsa:[[ARCH2]])" {[[P10]]}, object
|
| 303 | +// RELOC2-NOT: host |
283 | 304 |
|
284 | 305 | //
|
285 | 306 | // Test two gpu architectures with complete compilation in device-only
|
|
288 | 309 | // RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \
|
289 | 310 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-device-only \
|
290 | 311 | // RUN: 2>&1 | FileCheck -check-prefixes=DBIN2 %s
|
| 312 | +// |
| 313 | +// Test two gpu architectures with complete compilation in device-only |
| 314 | +// compilation mode with an unused host linker flag. |
| 315 | +// |
| 316 | +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ |
| 317 | +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-device-only \ |
| 318 | +// RUN: -Wl,--disable-new-dtags 2>&1 | FileCheck -check-prefixes=DBIN2 %s |
| 319 | + |
291 | 320 | // DBIN2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]])
|
292 | 321 | // DBIN2-DAG: [[P1:[0-9]+]]: preprocessor, {[[P0]]}, [[T]]-cpp-output, (device-[[T]], [[ARCH]])
|
293 | 322 | // DBIN2-DAG: [[P2:[0-9]+]]: compiler, {[[P1]]}, ir, (device-[[T]], [[ARCH]])
|
|
305 | 334 | // DBIN2-DAG: [[P14:[0-9]+]]: linker, {[[P6]], [[P13]]}, hip-fatbin, (device-hip, )
|
306 | 335 | // DBIN2-DAG: [[P15:[0-9]+]]: offload, "device-[[T]] (amdgcn-amd-amdhsa:)" {[[P14]]}, hip-fatbin
|
307 | 336 | // DBIN2-NOT: host
|
| 337 | + |
308 | 338 | //
|
309 | 339 | // Test two gpu architectures up to the assemble phase in device-only
|
310 | 340 | // compilation mode.
|
|
357 | 387 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t/obj1.o %t/obj2.o \
|
358 | 388 | // RUN: -fgpu-rdc --cuda-device-only 2>&1 | FileCheck -check-prefixes=L2,RL2,RL2-DEV %s
|
359 | 389 |
|
| 390 | +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ |
| 391 | +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t/obj1.o %t/obj2.o \ |
| 392 | +// RUN: -fgpu-rdc --cuda-device-only -Wl,--disable-new-dtags 2>&1 \ |
| 393 | +// RUN: | FileCheck -check-prefixes=L2,RL2,RL2-DEV %s |
| 394 | + |
360 | 395 | // RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \
|
361 | 396 | // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t/obj1.o %t/obj2.o \
|
362 | 397 | // RUN: -fgpu-rdc --cuda-device-only --no-gpu-bundle-output 2>&1 \
|
363 | 398 | // RUN: | FileCheck -check-prefixes=L2,RL2,RL2-NB %s
|
364 | 399 |
|
| 400 | +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ |
| 401 | +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t/obj1.o %t/obj2.o \ |
| 402 | +// RUN: -fgpu-rdc --cuda-device-only --no-gpu-bundle-output -Wl,--disable-new-dtags 2>&1 \ |
| 403 | +// RUN: | FileCheck -check-prefixes=L2,RL2,RL2-NB %s |
| 404 | + |
365 | 405 | // L2-DAG: [[P0:[0-9]+]]: input, "{{.*}}obj1.o", object
|
366 | 406 | // RL2-DAG: [[P1:[0-9]+]]: clang-offload-unbundler, {[[P0]]}, object
|
367 | 407 | // L2-DAG: [[P2:[0-9]+]]: input, "{{.*}}obj2.o", object
|
|
381 | 421 | // NL2-DAG: [[P4:[0-9]+]]: linker, {[[P0]], [[P2]]}, image
|
382 | 422 | // RL2-EM-DAG: [[P4:[0-9]+]]: linker, {[[P1]], [[P3]], [[P9]]}, image, (host-[[T]])
|
383 | 423 | // RL2-DEV-NOT: linker
|
| 424 | +// RL2-NB-NOT: host |
384 | 425 |
|
385 | 426 | // Test one gpu architectures up to the preprocessor expansion output phase in device-only
|
386 | 427 | // compilation mode. no bundle.
|
|
0 commit comments