Skip to content

Commit 0d5f046

Browse files
committed
Add small example to test the issue
1 parent ccd8f78 commit 0d5f046

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/generate_coverage.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,54 @@ jobs:
6969
echo "Grep for SubmissionInfo:"
7070
sudo nm -A /opt/intel/oneapi/mkl/2025.0/lib/libmkl_sycl_vm.so.5 | grep SubmissionInfo
7171
72+
- name: Create test file
73+
uses: 1arp/[email protected]
74+
with:
75+
path: 'example'
76+
isAbsolutePath: false
77+
file: 'test.cpp'
78+
content: |
79+
#include <sycl/sycl.hpp>
80+
#include <oneapi/mkl.hpp>
81+
82+
namespace mkl_vm = oneapi::mkl::vm;
83+
84+
int main(void)
85+
{
86+
sycl::queue q{sycl::default_selector_v};
87+
88+
const auto &dev = q.get_device();
89+
std::cout << "Device: " << dev.get_info<sycl::info::device::name>() << std::endl;
90+
std::cout << "Driver_version: " << dev.get_info<sycl::info::device::driver_version>() << std::endl;
91+
92+
using T = float;
93+
constexpr std::size_t size = 10;
94+
95+
T *data = sycl::malloc_device<T>(size, q);
96+
T *res = sycl::malloc_device<T>(size, q);
97+
98+
auto fill_ev = q.fill<T>(data, T(-1.0), size);
99+
100+
mkl_vm::abs(q, size, data, res, {fill_ev}).wait_and_throw();
101+
102+
sycl::free(data, q);
103+
sycl::free(res, q);
104+
105+
std::cout << "Exit" << std::endl;
106+
return 0;
107+
}
108+
109+
- name: Cat test file
110+
run: cat example/test.cpp
111+
112+
- name: Build test file
113+
run: icpx -fsycl test.cpp -DMKL_ILP64 -qmkl-ilp64=parallel -qtbb -o test.x
114+
working-directory: example
115+
116+
- name: Run test file
117+
run: ./test.x
118+
working-directory: example
119+
72120
new-release:
73121
name: Install oneAPI with 2025.1
74122
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)