Skip to content

Commit aae7f13

Browse files
authored
[SYCL][E2E] Cleanup compilation redundancies for FPGA archive tests (#16583)
These tests are testing various combinations of compilation modes using FPGA -fsycl-link. The mixing and matching were a bit over-kill. Update these tests to cover the various modes, but reduce the combinations.
1 parent c6b1edf commit aae7f13

File tree

2 files changed

+15
-83
lines changed

2 files changed

+15
-83
lines changed

sycl/test-e2e/AOT/fpga-aoc-archive-split-per-kernel.cpp

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,88 +6,33 @@
66
// Remove any archives
77
// RUN: rm -f %t_*.a
88

9-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9+
// Build main object.
10+
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -c %S/Inputs/fpga_main.cpp -o %t_main.o
11+
1212
// Build any early archive binaries.
1313
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=early %S/Inputs/fpga_sub.cpp -o %t_early_sub.a
1414
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=early %S/Inputs/fpga_add.cpp -o %t_early_add.a
1515
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=early %S/Inputs/fpga_sub_x.cpp -o %t_early_sub_x.a
1616
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=early %S/Inputs/fpga_add_x.cpp -o %t_early_add_x.a
17-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
18-
// Use a variety of archive orders
19-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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: %{run} %t_early.out
22-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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: %{run} %t_early.out
24-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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: %{run} %t_early.out
26-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
17+
18+
// Test baseline of all early archives and main.
19+
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
2720
// RUN: %{run} %t_early.out
2821

29-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3222
// Build any image archive binaries.
3323
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %S/Inputs/fpga_sub.cpp -o %t_image_sub.a
3424
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %S/Inputs/fpga_add.cpp -o %t_image_add.a
3525
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %S/Inputs/fpga_sub_x.cpp -o %t_image_sub_x.a
3626
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %S/Inputs/fpga_add_x.cpp -o %t_image_add_x.a
37-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
38-
// Use a variety of archive orders
39-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
40-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
27+
28+
// Test baseline of all image archives and main.
29+
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
4130
// RUN: %{run} %t_image.out
42-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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_early.out
43-
// RUN: %{run} %t_early.out
44-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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_early.out
45-
// RUN: %{run} %t_early.out
46-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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_early.out
47-
// RUN: %{run} %t_early.out
4831

49-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
50-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
51-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5232
// Build any image archive binaries from early archives.
53-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %t_early_sub.a -o %t_early_image_sub.a
54-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %t_early_add.a -o %t_early_image_add.a
5533
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %t_early_sub_x.a -o %t_early_image_sub_x.a
5634
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl -fsycl-link=image %t_early_add_x.a -o %t_early_image_add_x.a
57-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
58-
// Use a variety of archive orders
59-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
60-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
61-
// RUN: %{run} %t_early_image.out
62-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
63-
// RUN: %{run} %t_early_image.out
64-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
65-
// RUN: %{run} %t_early_image.out
66-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
67-
// RUN: %{run} %t_early_image.out
6835

69-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
70-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
71-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7236
// Mix early and image archive usage
73-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
74-
// RUN: %{run} %t_mix.out
75-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -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
76-
// RUN: %{run} %t_mix.out
77-
78-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
79-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
80-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
81-
// Provide some kernels without going through an archive
82-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
83-
// RUN: %{run} %t_mix.out
84-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_early_sub.a %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
85-
// RUN: %{run} %t_mix.out
86-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %S/Inputs/fpga_sub.cpp %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
87-
// RUN: %{run} %t_mix.out
88-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %S/Inputs/fpga_sub.cpp %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
89-
// RUN: %{run} %t_mix.out
90-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %S/Inputs/fpga_add_x.cpp %t_image_sub_x.a -o %t_mix.out
91-
// RUN: %{run} %t_mix.out
92-
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %S/Inputs/fpga_add_x.cpp %t_early_sub_x.a -o %t_mix.out
37+
// RUN: %clangxx -fintelfpga -fsycl-device-code-split=per_kernel -fsycl %t_main.o %t_early_add.a %t_image_sub.a %t_early_image_add_x.a %t_early_image_sub_x.a -o %t_mix.out
9338
// RUN: %{run} %t_mix.out

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

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// Remove any archives
77
// RUN: rm -f %t_*.a
88

9-
////////////////////////////////////////////////////////////////////////////////
10-
////////////////////////////////////////////////////////////////////////////////
11-
////////////////////////////////////////////////////////////////////////////////
9+
// Build main
10+
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp -c -o %t_main.o
11+
1212
// Build any early archive binaries.
1313
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_sub.cpp -o %t_early_sub.a
1414
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=early %S/Inputs/fpga_sub_x.cpp -o %t_early_sub_x.a
@@ -19,19 +19,6 @@
1919
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=image %S/Inputs/fpga_sub_x.cpp -o %t_image_sub_x.a
2020
// RUN: %clangxx -fintelfpga -fsycl -fsycl-link=image %S/Inputs/fpga_add_x.cpp -o %t_image_add_x.a
2121

22-
////////////////////////////////////////////////////////////////////////////////
23-
////////////////////////////////////////////////////////////////////////////////
24-
////////////////////////////////////////////////////////////////////////////////
25-
// Provide some kernels without going through an archive
26-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
27-
// RUN: %{run} %t_mix.out
28-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_early_sub.a %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
29-
// RUN: %{run} %t_mix.out
30-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %S/Inputs/fpga_sub.cpp %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
31-
// RUN: %{run} %t_mix.out
32-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %S/Inputs/fpga_sub.cpp %t_image_add_x.a %t_early_sub_x.a -o %t_mix.out
33-
// RUN: %{run} %t_mix.out
34-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %S/Inputs/fpga_add_x.cpp %t_image_sub_x.a -o %t_mix.out
35-
// RUN: %{run} %t_mix.out
36-
// RUN: %clangxx -fintelfpga -fsycl %S/Inputs/fpga_main.cpp %S/Inputs/fpga_add.cpp %t_image_sub.a %S/Inputs/fpga_add_x.cpp %t_early_sub_x.a -o %t_mix.out
22+
// Build using various combinations of archives and source.
23+
// RUN: %clangxx -fintelfpga -fsycl %t_main.o %S/Inputs/fpga_add.cpp %t_image_sub.a %t_early_add_x.a %t_image_sub_x.a -o %t_mix.out
3724
// RUN: %{run} %t_mix.out

0 commit comments

Comments
 (0)