|
14 | 14 |
|
15 | 15 | int main() {
|
16 | 16 |
|
| 17 | +sycl::queue q; |
| 18 | + |
17 | 19 | if (!q.get_device().has(sycl::aspect::fp16)) {
|
18 | 20 | std::cout << "skipping fp16 tests: requires fp16 device aspect."
|
19 | 21 | << std::endl;
|
20 | 22 | return 0;
|
21 | 23 | }
|
22 | 24 |
|
23 |
| -sycl::queue q; |
24 |
| - |
25 |
| -const half tv[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0, |
| 25 | +const sycl::half tv[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0, |
26 | 26 | -1.7, 1.7, -1.2, 1.2, -3.0, 3.0, -10.0, 10.0};
|
27 |
| -const half tl[16] = {-0.97, -0.91, -0.77, -0.1, 0.95, 0.89, 0.75, -0.1, |
| 27 | +const sycl::half tl[16] = {-0.97, -0.91, -0.77, -0.1, 0.95, 0.89, 0.75, -0.1, |
28 | 28 | -0.94, 0.92, -0.84, 0.82, -1.0, 0.98, -1.10, 0.98};
|
29 |
| -const half tu[16] = {-0.95, -0.89, -0.75, 0.1, 0.97, 0.91, 0.77, 0.1, |
| 29 | +const sycl::half tu[16] = {-0.95, -0.89, -0.75, 0.1, 0.97, 0.91, 0.77, 0.1, |
30 | 30 | -0.92, 0.94, -0.82, 0.84, -0.98, 1.00, -0.98, 1.10};
|
31 | 31 |
|
32 | 32 | native_tanh_tester<sycl::half>(q, tv[0], tl[0], tu[0]);
|
@@ -56,11 +56,11 @@ native_tanh_tester<sycl::half16>(
|
56 | 56 | {tu[0], tu[1], tu[2], tu[3], tu[4], tu[5], tu[6], tu[7], tu[8], tu[9],
|
57 | 57 | tu[10], tu[11], tu[12], tu[13], tu[14], tu[15]});
|
58 | 58 |
|
59 |
| -const half ev[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0, |
| 59 | +const sycl::half ev[16] = {-2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0, |
60 | 60 | -2.0, -1.5, -1.0, 0.0, 2.0, 1.5, 1.0, 0.0};
|
61 |
| -const half el[16] = {0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9, |
| 61 | +const sycl::half el[16] = {0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9, |
62 | 62 | 0.1, 0.34, 0.4, -0.9, 3.9, 2.7, 1.9, -0.9};
|
63 |
| -const half eu[16] = {0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1, |
| 63 | +const sycl::half eu[16] = {0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1, |
64 | 64 | 0.3, 0.36, 0.6, 1.1, 4.1, 2.9, 2.1, 1.1};
|
65 | 65 |
|
66 | 66 | native_exp2_tester<sycl::half>(q, ev[0], el[0], eu[0]);
|
|
0 commit comments