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

Class TensorPool

gpu.hpp:190–195  ·  view source on GitHub ↗

* @brief Represents a pool of tensors to manage GPU resources. The pool is * responsible for managing the lifetime of the tensors and freeing them when * the pool is destroyed. * * Most users do not need to interact with the TensorPool type, as there is a * member instance in the Context struct to simplify lifetime management of GPU * resources. */

Source from the content-addressed store, hash-verified

188 * resources.
189 */
190struct TensorPool {
191 inline TensorPool(Context *ctx) : ctx(ctx), data() {};
192 Context *ctx;
193 std::unordered_map<WGPUBuffer, Tensor> data;
194 ~TensorPool();
195};
196
197enum NumType {
198 kf16, // (experimental)

Callers 1

ContextClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected