Skip to content

Commit 5525c33

Browse files
committed
Split e2e test for imf fp16 trivial function to cover multiple cu scenario
Signed-off-by: jinge90 <[email protected]>
1 parent 05fd6da commit 5525c33

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

sycl/test-e2e/DeviceLib/imf_fp16_trivial_test.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
55

6-
// RUN: %{build} %{mathflags} -o %t.out
6+
// RUN: %{build} %{mathflags} -c -DSOURCE1 -o %t1.o
7+
// RUN: %{build} %{mathflags} -c -DSOURCE2 -o %t2.o
8+
// RUN: %clangxx -fsycl %t1.o %t2.o -o %t.out
79
// RUN: %{run} %t.out
810

911
// UNSUPPORTED: cuda, hip
@@ -17,7 +19,8 @@
1719

1820
namespace sycl_imf = sycl::ext::intel::math;
1921

20-
int main(int, char **) {
22+
#ifdef SOURCE1
23+
void run_imf_fp16_test() {
2124
sycl::queue device_queue(sycl::default_selector_v);
2225
std::cout << "Running on "
2326
<< device_queue.get_device().get_info<sycl::info::device::name>()
@@ -415,5 +418,13 @@ int main(int, char **) {
415418
std::cout << "hcmadd passes." << std::endl;
416419
}
417420

421+
}
422+
#endif
423+
424+
#ifdef SOURCE2
425+
void run_imf_fp16_test();
426+
int main(int argc, char **argv) {
427+
run_imf_fp16_test();
418428
return 0;
419429
}
430+
#endif

0 commit comments

Comments
 (0)