pulsatrix
Loading...
Searching...
No Matches
sinusoidal_timestep_embedding.hpp
Go to the documentation of this file.
1
5#pragma once
6
7#include <cstdint>
8
10#include "pulsatrix/tensor.hpp"
11
12namespace pulsatrix {
13
51[[nodiscard]] Tensor SinusoidalTimestepEmbedding(int64_t t, int64_t embedding_dim, DeviceBackend* backend,
52 float base = 10000.0f);
53
54} // namespace pulsatrix
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:219
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Abstract interface isolating vendor-specific memory/compute operations from Tensor/ComputationGraph.
Definition acquisition_functions.hpp:16
Tensor SinusoidalTimestepEmbedding(int64_t t, int64_t embedding_dim, DeviceBackend *backend, float base=10000.0f)
Standard Transformer-style sinusoidal encoding of a diffusion timestep t: emb[2i] = sin(t / base^(2i/...
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).