@@ -497,6 +497,7 @@ py::object py_dot_blocking(sycl::queue q,
497
497
reinterpret_cast <const T *>(v2_typeless_ptr), 1 , res_usm, depends);
498
498
T res_v{};
499
499
q.copy <T>(res_usm, &res_v, 1 , {dot_ev}).wait_and_throw ();
500
+ sycl::free (res_usm, q);
500
501
res = py::float_ (res_v);
501
502
}
502
503
else if (v1_typenum == UAR_FLOAT) {
@@ -507,6 +508,7 @@ py::object py_dot_blocking(sycl::queue q,
507
508
reinterpret_cast <const T *>(v2_typeless_ptr), 1 , res_usm, depends);
508
509
T res_v (0 );
509
510
q.copy <T>(res_usm, &res_v, 1 , {dot_ev}).wait_and_throw ();
511
+ sycl::free (res_usm, q);
510
512
res = py::float_ (res_v);
511
513
}
512
514
else if (v1_typenum == UAR_CDOUBLE) {
@@ -517,6 +519,7 @@ py::object py_dot_blocking(sycl::queue q,
517
519
reinterpret_cast <const T *>(v2_typeless_ptr), 1 , res_usm, depends);
518
520
T res_v{};
519
521
q.copy <T>(res_usm, &res_v, 1 , {dotc_ev}).wait_and_throw ();
522
+ sycl::free (res_usm, q);
520
523
res = py::cast (res_v);
521
524
}
522
525
else if (v1_typenum == UAR_CFLOAT) {
@@ -527,6 +530,7 @@ py::object py_dot_blocking(sycl::queue q,
527
530
reinterpret_cast <const T *>(v2_typeless_ptr), 1 , res_usm, depends);
528
531
T res_v{};
529
532
q.copy <T>(res_usm, &res_v, 1 , {dotc_ev}).wait_and_throw ();
533
+ sycl::free (res_usm, q);
530
534
res = py::cast (res_v);
531
535
}
532
536
else {
0 commit comments