Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:248
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Definition acquisition_functions.hpp:16
void WriteNpy(const std::string &path, const Tensor &x)
SerializeNpy() written to path.
void ExportEmbeddings(const std::string &directory, const Tensor &x, const std::vector< MetadataColumn > &columns={})
Writes x for UMAP and t-SNE tools into directory, which must exist: vectors.npy, vectors....
std::vector< uint8_t > SerializeNpy(const Tensor &x)
A tensor as a .npy file: format version 1.0, little-endian float32 (<f4), C order,...
std::string ProjectorMetadataTsv(const std::vector< MetadataColumn > &columns)
The Embedding Projector's metadata file: a line per point, a column per entry of columns,...
std::string ProjectorVectorsTsv(const Tensor &x)
The Embedding Projector's tensor file: a line per row of x, its values separated by tabs....
Tensor ParseNpy(const std::vector< uint8_t > &bytes, DeviceBackend *backend)
A .npy file as a float32 tensor on backend, with the file's shape.
Tensor ReadNpy(const std::string &path, DeviceBackend *backend)
ParseNpy() of the file at path.
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).