mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	Update ggml/src/ggml-sycl/ggml-sycl.cpp
This commit is contained in:
		@@ -372,7 +372,8 @@ static void ggml_backend_sycl_buffer_set_tensor(ggml_backend_buffer_t buffer,
 | 
				
			|||||||
    auto stream = &(dpct::dev_mgr::instance().get_device(ctx->device).default_queue());
 | 
					    auto stream = &(dpct::dev_mgr::instance().get_device(ctx->device).default_queue());
 | 
				
			||||||
    SYCL_CHECK(
 | 
					    SYCL_CHECK(
 | 
				
			||||||
        CHECK_TRY_ERROR(dpct::dev_mgr::instance().get_device(ctx->device).queues_wait_and_throw()));
 | 
					        CHECK_TRY_ERROR(dpct::dev_mgr::instance().get_device(ctx->device).queues_wait_and_throw()));
 | 
				
			||||||
    //note: use host buffer to save the data from mmap(), then copy to device. It's workaround for mmap() issue on PVC GPU.
 | 
					    // Note: Use host buffer to save the data from mmap(), then copy to device. It's workaround for mmap() issue on PVC GPU. 
 | 
				
			||||||
 | 
					    // This function will be called during load model from disk. Use memory buffer replace dynamic won't save more time and brings potential memory leak risk here.
 | 
				
			||||||
    char* host_buf = (char*)malloc(size);
 | 
					    char* host_buf = (char*)malloc(size);
 | 
				
			||||||
    memcpy(host_buf, data, size);
 | 
					    memcpy(host_buf, data, size);
 | 
				
			||||||
    SYCL_CHECK(
 | 
					    SYCL_CHECK(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user