Add comment
This commit is contained in:
parent
608fc9d16d
commit
edee0d6bc6
|
|
@ -146,8 +146,13 @@ struct webgpu_submission_futures {
|
|||
struct webgpu_buf_pool {
|
||||
std::vector<webgpu_pool_bufs> free;
|
||||
|
||||
// The pool must be synchronized because:
|
||||
// 1. The memset pool is shared globally by every ggml buffer,
|
||||
// since allocating a pool per ggml buffer would consume too much memory.
|
||||
// 2. For the per-thread buffer pools in webgpu_context,
|
||||
// buffers are allocated and freed in Dawn callbacks,
|
||||
// which can run on a different thread than the calling thread.
|
||||
std::mutex mutex;
|
||||
|
||||
std::condition_variable cv;
|
||||
|
||||
void init(wgpu::Device device,
|
||||
|
|
|
|||
Loading…
Reference in New Issue