-
Notifications
You must be signed in to change notification settings - Fork 808
[Driver][SYCL][FPGA] Enable dependency file usage from static archive… #2443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /// | ||
| /// tests specific to -fintelfpga -fsycl w/ static libs | ||
| /// | ||
| // REQUIRES: clang-driver | ||
| // REQUIRES: system-windows | ||
|
|
||
| // make dummy archive | ||
| // Build a fat static lib that will be used for all tests | ||
| // RUN: echo "void foo(void) {}" > %t1.cpp | ||
| // RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fintelfpga %t1.cpp -c -o %t1_bundle.obj | ||
| // RUN: lib -out:%t.lib %t1_bundle.obj | ||
|
|
||
| /// Check phases with static lib | ||
| // RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fintelfpga %t.lib -ccc-print-phases 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK_PHASES %s | ||
| // CHECK_PHASES: 0: input, "[[INPUT:.+\.lib]]", object, (host-sycl) | ||
| // CHECK_PHASES: 1: linker, {0}, image, (host-sycl) | ||
| // CHECK_PHASES: 2: input, "[[INPUT]]", archive | ||
| // CHECK_PHASES: 3: clang-offload-unbundler, {2}, archive | ||
| // CHECK_PHASES: 4: linker, {3}, ir, (device-sycl) | ||
| // CHECK_PHASES: 5: sycl-post-link, {4}, ir, (device-sycl) | ||
| // CHECK_PHASES: 6: llvm-spirv, {5}, spirv, (device-sycl) | ||
| // CHECK_PHASES: 7: input, "[[INPUT]]", archive | ||
| // CHECK_PHASES: 8: clang-offload-unbundler, {7}, fpga_dependencies_list | ||
| // CHECK_PHASES: 9: backend-compiler, {6, 8}, fpga_aocx, (device-sycl) | ||
| // CHECK_PHASES: 10: clang-offload-wrapper, {9}, object, (device-sycl) | ||
| // CHECK_PHASES: 11: offload, "host-sycl (x86_64-pc-windows-msvc)" {1}, "device-sycl (spir64_fpga-unknown-unknown-sycldevice)" {10}, image | ||
|
|
||
| /// Check for unbundle and use of deps in static lib | ||
| // RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fintelfpga %t.lib -### 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK_UNBUNDLE %s | ||
| // CHECK_UNBUNDLE: clang-offload-bundler" "-type=aoo" "-targets=sycl-fpga_dep" "-inputs={{.*}}" "-outputs=[[DEPFILES:.+\.txt]]" "-unbundle" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wondering, why is it that separate unbundler calls are being made using the same archive instead of a single one as a comma? I can't quite trace this back in the code...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The unbundling of the dep files is separate from the unbundle call after the partial-link. The behavior is similar to what we do for grabbing the dep files for objects.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might've formulated this incorrectly - didn't mean this thread to be strictly focused on the current patch :) More of a "why do we have to have separate unbundler calls at all if we're able to get multiple outputs from a single one". But I have a vague idea that the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. The additional dependency target doesn't fit within the regular unbundler behavior expectations (full toolchains for each target), so we add the dep file extraction as a singular input to the offline compile. There may be a way to accomplish this, but would probably require a bit more investigation/rework. |
||
| // CHECK_UNBUNDLE: aoc{{.*}} "-dep-files=@[[DEPFILES]]" | ||
meiyacha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /// | ||
| /// tests specific to -fintelfpga -fsycl w/ static libs | ||
| /// | ||
| // REQUIRES: clang-driver | ||
|
|
||
| // make dummy archive | ||
| // Build a fat static lib that will be used for all tests | ||
| // RUN: echo "void foo(void) {}" > %t1.cpp | ||
| // RUN: %clangxx -target x86_64-unknown-linux-gnu -fintelfpga -fsycl %t1.cpp -c -o %t1_bundle.o | ||
| // RUN: llvm-ar cr %t.a %t1_bundle.o | ||
|
|
||
| /// Check phases with static lib | ||
| // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fintelfpga %t.a -ccc-print-phases 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK_PHASES %s | ||
| // CHECK_PHASES: 0: input, "[[INPUT:.+\.a]]", object, (host-sycl) | ||
| // CHECK_PHASES: 1: linker, {0}, image, (host-sycl) | ||
| // CHECK_PHASES: 2: input, "[[INPUT]]", archive | ||
| // CHECK_PHASES: 3: partial-link, {2}, object | ||
| // CHECK_PHASES: 4: clang-offload-unbundler, {3}, object | ||
| // CHECK_PHASES: 5: linker, {4}, ir, (device-sycl) | ||
| // CHECK_PHASES: 6: sycl-post-link, {5}, ir, (device-sycl) | ||
| // CHECK_PHASES: 7: llvm-spirv, {6}, spirv, (device-sycl) | ||
| // CHECK_PHASES: 8: input, "[[INPUT]]", archive | ||
| // CHECK_PHASES: 9: clang-offload-unbundler, {8}, fpga_dependencies_list | ||
| // CHECK_PHASES: 10: backend-compiler, {7, 9}, fpga_aocx, (device-sycl) | ||
| // CHECK_PHASES: 11: clang-offload-wrapper, {10}, object, (device-sycl) | ||
| // CHECK_PHASES: 12: offload, "host-sycl (x86_64-unknown-linux-gnu)" {1}, "device-sycl (spir64_fpga-unknown-unknown-sycldevice)" {11}, image | ||
|
|
||
| /// Check for unbundle and use of deps in static lib | ||
| // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fintelfpga %t.a -### 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK_UNBUNDLE %s | ||
| // CHECK_UNBUNDLE: clang-offload-bundler" "-type=aoo" "-targets=sycl-fpga_dep" "-inputs={{.*}}" "-outputs=[[DEPFILES:.+\.txt]]" "-unbundle" | ||
| // CHECK_UNBUNDLE: aoc{{.*}} "-dep-files=@[[DEPFILES]]" |
Uh oh!
There was an error while loading. Please reload this page.