Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] remove global variables #7710

Merged
merged 10 commits into from
Jun 15, 2024
Prev Previous commit
Next Next commit
trim white space
  • Loading branch information
airMeng committed Jun 13, 2024
commit d342abca575309263f21069a1fcd11ffbdc86055
2 changes: 1 addition & 1 deletion ggml-sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11427,7 +11427,7 @@ static void ggml_sycl_mul_mat_vec_nc(ggml_backend_sycl_context & ctx, const ggml

SYCL_CHECK(ggml_sycl_set_device(ctx.device));
queue_ptr main_stream = ctx.stream();

void * src0_ddq = src0->data;
float * src1_ddf = (float *) src1->data;
float * dst_ddf = (float *) dst->data;
Expand Down
2 changes: 1 addition & 1 deletion ggml-sycl/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct ggml_sycl_pool_alloc {

// size is in number of elements
T * alloc(size_t size) {
GGML_ASSERT(pool != nullptr);
GGML_ASSERT(pool != nullptr);
GGML_ASSERT(ptr == nullptr);
ptr = (T *) pool->alloc(size * sizeof(T), &this->actual_size);
return ptr;
Expand Down
2 changes: 1 addition & 1 deletion ggml-sycl/dpct/helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ namespace dpct
sycl::backend backend2 = device2.get_backend();
// levelzero backends always come first
if(backend1 == sycl::backend::ext_oneapi_level_zero && backend2 != sycl::backend::ext_oneapi_level_zero) return true;
if(backend1 != sycl::backend::ext_oneapi_level_zero && backend2 == sycl::backend::ext_oneapi_level_zero) return false;
if(backend1 != sycl::backend::ext_oneapi_level_zero && backend2 == sycl::backend::ext_oneapi_level_zero) return false;
dpct::device_info prop1;
dpct::get_device_info(prop1, device1);
dpct::device_info prop2;
Expand Down