Skip to content

Commit 18133ca

Browse files
committed
Revert "use the correct SYCL context for host USM allocations"
Manually reverting: #7858 Signed-off-by: Joe Todd <[email protected]>
1 parent abd7c7b commit 18133ca

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ggml-sycl.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -13072,12 +13072,9 @@ void *ggml_sycl_host_malloc(size_t size) try {
1307213072
return nullptr;
1307313073
}
1307413074

13075-
ggml_sycl_set_device(g_main_device);
13076-
dpct::queue_ptr main_stream = g_syclStreams[g_main_device][0];
13077-
1307813075
void * ptr = nullptr;
1307913076
dpct::err0 err = CHECK_TRY_ERROR(
13080-
ptr = (void *)sycl::malloc_host(size, *main_stream));
13077+
ptr = (void *)sycl::malloc_host(size, dpct::get_in_order_queue()));
1308113078

1308213079
if (err != 0) {
1308313080
// clear the error
@@ -13098,9 +13095,7 @@ catch (sycl::exception const &exc) {
1309813095
}
1309913096

1310013097
void ggml_sycl_host_free(void *ptr) try {
13101-
ggml_sycl_set_device(g_main_device);
13102-
dpct::queue_ptr main_stream = g_syclStreams[g_main_device][0];
13103-
SYCL_CHECK(CHECK_TRY_ERROR(sycl::free(ptr, *main_stream)));
13098+
SYCL_CHECK(CHECK_TRY_ERROR(sycl::free(ptr, dpct::get_in_order_queue())));
1310413099
}
1310513100
catch (sycl::exception const &exc) {
1310613101
std::cerr << exc.what() << "Exception caught at file:" << __FILE__

0 commit comments

Comments
 (0)