|
46 | 46 | // CK-HELP: {{.*}}bc {{.*}}- llvm-bc
|
47 | 47 | // CK-HELP: {{.*}}s {{.*}}- assembler
|
48 | 48 | // CK-HELP: {{.*}}o {{.*}}- object
|
| 49 | +// CK-HELP: {{.*}}a {{.*}}- archive of objects |
49 | 50 | // CK-HELP: {{.*}}gch {{.*}}- precompiled-header
|
50 | 51 | // CK-HELP: {{.*}}ast {{.*}}- clang AST file
|
51 | 52 | // CK-HELP: {{.*}}-unbundle {{.*}}- Unbundle bundled file into several output files.
|
|
103 | 104 | // RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,host-%itanium_abi_triple,openmp-x86_64-pc-linux-gnu -inputs=%t.i,%t.tgt1,%t.tgt2 -outputs=%t.bundle.i 2>&1 | FileCheck %s --check-prefix CK-ERR9B
|
104 | 105 | // CK-ERR9B: error: Duplicate targets are not allowed
|
105 | 106 |
|
| 107 | +// RUN: not clang-offload-bundler -type=a -targets=hxst-powerpcxxle-ibm-linux-gnu,openxp-pxxerpc64le-ibm-linux-gnu,xpenmp-x86_xx-pc-linux-gnu -inputs=%t.i,%t.tgt1,%t.tgt2 -outputs=%t.bundle.i 2>&1 | FileCheck %s --check-prefix CK-ERR10A |
| 108 | +// CK-ERR10A: error: Archive files are only supported for unbundling |
| 109 | + |
106 | 110 | //
|
107 | 111 | // Check text bundle. This is a readable format, so we check for the format we expect to find.
|
108 | 112 | //
|
|
313 | 317 | //
|
314 | 318 | // Check error due to missing bundles
|
315 | 319 | //
|
316 |
| -// RUN: clang-offload-bundler -type=bc -targets=host-%itanium_abi_triple,hip-amdgcn-amd-amdhsa-gfx900 -inputs=%t.bc,%t.tgt1 -outputs=%t.hip.bundle.bc |
| 320 | +// RUN: clang-offload-bundler -type=bc -targets=host-%itanium_abi_triple,hip-amdgcn-amd-amdhsa--gfx900 -inputs=%t.bc,%t.tgt1 -outputs=%t.hip.bundle.bc |
317 | 321 | // RUN: not clang-offload-bundler -type=bc -inputs=%t.hip.bundle.bc -outputs=%t.tmp.bc -unbundle \
|
318 |
| -// RUN: -targets=hip-amdgcn-amd-amdhsa-gfx906 \ |
| 322 | +// RUN: -targets=hip-amdgcn-amd-amdhsa--gfx906 \ |
319 | 323 | // RUN: 2>&1 | FileCheck -check-prefix=MISS1 %s
|
320 | 324 | // RUN: not clang-offload-bundler -type=bc -inputs=%t.hip.bundle.bc -outputs=%t.tmp.bc,%t.tmp2.bc -unbundle \
|
321 |
| -// RUN: -targets=hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx900 \ |
| 325 | +// RUN: -targets=hip-amdgcn-amd-amdhsa--gfx906,hip-amdgcn-amd-amdhsa--gfx900 \ |
322 | 326 | // RUN: 2>&1 | FileCheck -check-prefix=MISS1 %s
|
323 |
| -// MISS1: error: Can't find bundles for hip-amdgcn-amd-amdhsa-gfx906 |
| 327 | +// MISS1: error: Can't find bundles for hip-amdgcn-amd-amdhsa--gfx906 |
324 | 328 | // RUN: not clang-offload-bundler -type=bc -inputs=%t.hip.bundle.bc -outputs=%t.tmp.bc,%t.tmp2.bc -unbundle \
|
325 |
| -// RUN: -targets=hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx803 \ |
| 329 | +// RUN: -targets=hip-amdgcn-amd-amdhsa--gfx906,hip-amdgcn-amd-amdhsa--gfx803 \ |
326 | 330 | // RUN: 2>&1 | FileCheck -check-prefix=MISS2 %s
|
327 |
| -// MISS2: error: Can't find bundles for hip-amdgcn-amd-amdhsa-gfx803 and hip-amdgcn-amd-amdhsa-gfx906 |
| 331 | +// MISS2: error: Can't find bundles for hip-amdgcn-amd-amdhsa--gfx803 and hip-amdgcn-amd-amdhsa--gfx906 |
328 | 332 | // RUN: not clang-offload-bundler -type=bc -inputs=%t.hip.bundle.bc -outputs=%t.tmp.bc,%t.tmp2.bc,%t.tmp3.bc -unbundle \
|
329 |
| -// RUN: -targets=hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx803,hip-amdgcn-amd-amdhsa-gfx1010 \ |
| 333 | +// RUN: -targets=hip-amdgcn-amd-amdhsa--gfx906,hip-amdgcn-amd-amdhsa--gfx803,hip-amdgcn-amd-amdhsa--gfx1010 \ |
330 | 334 | // RUN: 2>&1 | FileCheck -check-prefix=MISS3 %s
|
331 |
| -// MISS3: error: Can't find bundles for hip-amdgcn-amd-amdhsa-gfx1010, hip-amdgcn-amd-amdhsa-gfx803, and hip-amdgcn-amd-amdhsa-gfx906 |
| 335 | +// MISS3: error: Can't find bundles for hip-amdgcn-amd-amdhsa--gfx1010, hip-amdgcn-amd-amdhsa--gfx803, and hip-amdgcn-amd-amdhsa--gfx906 |
332 | 336 |
|
333 | 337 | //
|
334 | 338 | // Check error due to duplicate targets
|
335 | 339 | //
|
336 |
| -// RUN: not clang-offload-bundler -type=bc -targets=host-%itanium_abi_triple,hip-amdgcn-amd-amdhsa-gfx900,hip-amdgcn-amd-amdhsa-gfx900 \ |
| 340 | +// RUN: not clang-offload-bundler -type=bc -targets=host-%itanium_abi_triple,hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx900 \ |
337 | 341 | // RUN: -inputs=%t.bc,%t.tgt1,%t.tgt1 -outputs=%t.hip.bundle.bc 2>&1 | FileCheck -check-prefix=DUP %s
|
338 | 342 | // RUN: not clang-offload-bundler -type=bc -inputs=%t.hip.bundle.bc -outputs=%t.tmp.bc,%t.tmp2.bc -unbundle \
|
339 |
| -// RUN: -targets=hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx906 \ |
| 343 | +// RUN: -targets=hip-amdgcn-amd-amdhsa--gfx906,hip-amdgcn-amd-amdhsa--gfx906 \ |
340 | 344 | // RUN: 2>&1 | FileCheck -check-prefix=DUP %s
|
341 | 345 | // DUP: error: Duplicate targets are not allowed
|
342 | 346 | //
|
|
364 | 368 | //
|
365 | 369 | // Check bundling without host target is allowed for HIP.
|
366 | 370 | //
|
367 |
| -// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa-gfx900,hip-amdgcn-amd-amdhsa-gfx906 \ |
| 371 | +// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \ |
368 | 372 | // RUN: -inputs=%t.tgt1,%t.tgt2 -outputs=%t.hip.bundle.bc
|
369 | 373 | // RUN: clang-offload-bundler -type=bc -list -inputs=%t.hip.bundle.bc | FileCheck -check-prefix=NOHOST %s
|
370 |
| -// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa-gfx900,hip-amdgcn-amd-amdhsa-gfx906 \ |
| 374 | +// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \ |
371 | 375 | // RUN: -outputs=%t.res.tgt1,%t.res.tgt2 -inputs=%t.hip.bundle.bc -unbundle
|
372 | 376 | // RUN: diff %t.tgt1 %t.res.tgt1
|
373 | 377 | // RUN: diff %t.tgt2 %t.res.tgt2
|
374 | 378 | //
|
375 | 379 | // NOHOST-NOT: host-
|
376 |
| -// NOHOST-DAG: hip-amdgcn-amd-amdhsa-gfx900 |
377 |
| -// NOHOST-DAG: hip-amdgcn-amd-amdhsa-gfx906 |
| 380 | +// NOHOST-DAG: hip-amdgcn-amd-amdhsa--gfx900 |
| 381 | +// NOHOST-DAG: hip-amdgcn-amd-amdhsa--gfx906 |
| 382 | +// Check archive unbundling |
| 383 | +// |
| 384 | +// Create few code object bundles and archive them to create an input archive |
| 385 | +// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-amdgcn-amd-amdhsa--gfx906,openmp-amdgcn-amd-amdhsa--gfx908 -inputs=%t.o,%t.tgt1,%t.tgt2 -outputs=%t.simple.bundle |
| 386 | +// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-amdgcn-amd-amdhsa--gfx903 -inputs=%t.o,%t.tgt1 -outputs=%t.simple1.bundle |
| 387 | +// RUN: llvm-ar cr %t.input-archive.a %t.simple.bundle %t.simple1.bundle |
| 388 | + |
| 389 | +// RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa--gfx906,openmp-amdgcn-amd-amdhsa--gfx908 -inputs=%t.input-archive.a -outputs=%t-archive-gfx906-simple.a,%t-archive-gfx908-simple.a |
| 390 | +// RUN: llvm-ar t %t-archive-gfx906-simple.a | FileCheck %s -check-prefix=GFX906 |
| 391 | +// GFX906: simple-openmp-amdgcn-amd-amdhsa--gfx906 |
| 392 | +// RUN: llvm-ar t %t-archive-gfx908-simple.a | FileCheck %s -check-prefix=GFX908 |
| 393 | +// GFX908-NOT: {{gfx906}} |
378 | 394 |
|
379 | 395 | // Some code so that we can create a binary out of this file.
|
380 | 396 | int A = 0;
|
|
0 commit comments