Skip to content

Commit 2b14791

Browse files
authored
Merge pull request #97 from rafbiels/lc0-segfault
[lc0][SYCL] Fix segfault
2 parents 5c4cd52 + 403ef0a commit 2b14791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lc0/src/neural/sycl/layers.cc.dp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ void allocAndUpload(DataType** gpu_dest, std::vector<float> cpu_src,
16811681
return;
16821682
}
16831683

1684-
gpu_dest = (DataType **)sycl::malloc_device(size, sycl_queue);
1684+
*gpu_dest = sycl::malloc_device<DataType>(cpu_src.size(), sycl_queue);
16851685

16861686
//sycl_queue.memcpy(scratch, &cpu_src[0], cpu_src.size() * sizeof(float)).wait();
16871687
sycl_queue.memcpy(scratch, &cpu_src[0], cpu_src.size() * sizeof(float)).wait();

0 commit comments

Comments
 (0)