Skip to content

Commit 7835506

Browse files
[SYCL][E2E] Pre-compile fpga_main.cpp into .o file (#16579)
This particular TU has no device code so can be pre-compiled and passed as an object file to final link invocations without affecting the tests' purpose. I'm not touching `fpga-aoc-archive-split-per-kernel.cpp`/ `fpga-aoc-archive2.cpp` as these two are the slowest and would need other changes.
1 parent aae7f13 commit 7835506

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

sycl/test-e2e/AOT/fpga-aoc-archive-early.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
////////////////////////////////////////////////////////////////////////////////
99
////////////////////////////////////////////////////////////////////////////////
1010
////////////////////////////////////////////////////////////////////////////////
11+
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp -c -o %t_main.o
12+
1113
// Build any early archive binaries.
1214
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_sub.cpp -o %t_early_sub.a
1315
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_add.cpp -o %t_early_add.a
@@ -16,11 +18,11 @@
1618
////////////////////////////////////////////////////////////////////////////////
1719
// Use a variety of archive orders
1820
////////////////////////////////////////////////////////////////////////////////
19-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_add.a %t_early_sub.a %t_early_add_x.a %t_early_sub_x.a -o %t_early.out
21+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_add.a %t_early_sub.a %t_early_add_x.a %t_early_sub_x.a -o %t_early.out
2022
// RUN: %{run} %t_early.out
21-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_sub_x.a %t_early_add.a %t_early_sub.a %t_early_add_x.a -o %t_early.out
23+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_sub_x.a %t_early_add.a %t_early_sub.a %t_early_add_x.a -o %t_early.out
2224
// RUN: %{run} %t_early.out
23-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_add_x.a %t_early_sub_x.a %t_early_add.a %t_early_sub.a -o %t_early.out
25+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_add_x.a %t_early_sub_x.a %t_early_add.a %t_early_sub.a -o %t_early.out
2426
// RUN: %{run} %t_early.out
25-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_sub.a %t_early_add_x.a %t_early_sub_x.a %t_early_add.a -o %t_early.out
27+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_sub.a %t_early_add_x.a %t_early_sub_x.a %t_early_add.a -o %t_early.out
2628
// RUN: %{run} %t_early.out

sycl/test-e2e/AOT/fpga-aoc-archive-early2.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
////////////////////////////////////////////////////////////////////////////////
99
////////////////////////////////////////////////////////////////////////////////
1010
////////////////////////////////////////////////////////////////////////////////
11+
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp -c -o %t_main.o
12+
1113
// Build any early archive binaries.
1214
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_sub.cpp -o %t_early_sub.a
1315
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_add.cpp -o %t_early_add.a
@@ -25,11 +27,11 @@
2527
////////////////////////////////////////////////////////////////////////////////
2628
// Use a variety of archive orders
2729
////////////////////////////////////////////////////////////////////////////////
28-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_image_add.a %t_early_image_sub.a %t_early_image_add_x.a %t_early_image_sub_x.a -o %t_early_image.out
30+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_image_add.a %t_early_image_sub.a %t_early_image_add_x.a %t_early_image_sub_x.a -o %t_early_image.out
2931
// RUN: %{run} %t_early_image.out
30-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_image_sub_x.a %t_early_image_add.a %t_early_image_sub.a %t_early_image_add_x.a -o %t_early_image.out
32+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_image_sub_x.a %t_early_image_add.a %t_early_image_sub.a %t_early_image_add_x.a -o %t_early_image.out
3133
// RUN: %{run} %t_early_image.out
32-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_image_add_x.a %t_early_image_sub_x.a %t_early_image_add.a %t_early_image_sub.a -o %t_early_image.out
34+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_image_add_x.a %t_early_image_sub_x.a %t_early_image_add.a %t_early_image_sub.a -o %t_early_image.out
3335
// RUN: %{run} %t_early_image.out
34-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_image_sub.a %t_early_image_add_x.a %t_early_image_sub_x.a %t_early_image_add.a -o %t_early_image.out
36+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_image_sub.a %t_early_image_add_x.a %t_early_image_sub_x.a %t_early_image_add.a -o %t_early_image.out
3537
// RUN: %{run} %t_early_image.out

sycl/test-e2e/AOT/fpga-aoc-archive-image.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
////////////////////////////////////////////////////////////////////////////////
99
////////////////////////////////////////////////////////////////////////////////
1010
////////////////////////////////////////////////////////////////////////////////
11+
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp -c -o %t_main.o
12+
1113
// Build any image archive binaries.
1214
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=image %S/Inputs/fpga_sub.cpp -o %t_image_sub.a
1315
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=image %S/Inputs/fpga_add.cpp -o %t_image_add.a
@@ -16,11 +18,11 @@
1618
////////////////////////////////////////////////////////////////////////////////
1719
// Use a variety of archive orders
1820
////////////////////////////////////////////////////////////////////////////////
19-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_image_add.a %t_image_sub.a %t_image_add_x.a %t_image_sub_x.a -o %t_image.out
21+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_image_add.a %t_image_sub.a %t_image_add_x.a %t_image_sub_x.a -o %t_image.out
2022
// RUN: %{run} %t_image.out
21-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_image_sub_x.a %t_image_add.a %t_image_sub.a %t_image_add_x.a -o %t_image.out
23+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_image_sub_x.a %t_image_add.a %t_image_sub.a %t_image_add_x.a -o %t_image.out
2224
// RUN: %{run} %t_image.out
23-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_image_add_x.a %t_image_sub_x.a %t_image_add.a %t_image_sub.a -o %t_image.out
25+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_image_add_x.a %t_image_sub_x.a %t_image_add.a %t_image_sub.a -o %t_image.out
2426
// RUN: %{run} %t_image.out
25-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_image_sub.a %t_image_add_x.a %t_image_sub_x.a %t_image_add.a -o %t_image.out
27+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_image_sub.a %t_image_add_x.a %t_image_sub_x.a %t_image_add.a -o %t_image.out
2628
// RUN: %{run} %t_image.out

sycl/test-e2e/AOT/fpga-aoc-archive.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
////////////////////////////////////////////////////////////////////////////////
1010
////////////////////////////////////////////////////////////////////////////////
1111
////////////////////////////////////////////////////////////////////////////////
12+
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp -c -o %t_main.o
13+
1214
// Build any early archive binaries.
1315
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_sub.cpp -o %t_early_sub.a
1416
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_add.cpp -o %t_early_add.a
@@ -25,7 +27,7 @@
2527
////////////////////////////////////////////////////////////////////////////////
2628
////////////////////////////////////////////////////////////////////////////////
2729
// Mix early and image archive usage
28-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_early_add.a %t_image_sub.a %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
30+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_early_add.a %t_image_sub.a %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
2931
// RUN: %{run} %t_mix.out
30-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %t_image_add.a %t_early_sub.a %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
32+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %t_image_add.a %t_early_sub.a %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
3133
// RUN: %{run} %t_mix.out

0 commit comments

Comments
 (0)