MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / gpu_alloc

Function gpu_alloc

experimental/kernels/gpt2_webgpu.cpp:203–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202
203void gpu_alloc(Context& ctx, Tensor* tensors, size_t* sizes, size_t n) {
204 for (size_t i = 0; i < n; i++) {
205 tensors[i] = createTensor(ctx, Shape{sizes[i]}, kf32);
206 }
207}
208
209typedef struct {
210 GPT2Config config;

Callers 2

gpt2_forwardFunction · 0.85

Calls 1

createTensorFunction · 0.85

Tested by

no test coverage detected