Fp16 Layout Convert#

cudaError_t trt_edgellm::kernel::launchCopyBytes(
void const *source,
void *destination,
size_t bytes,
cudaStream_t stream
)#

Copy CUDA-addressable bytes directly into final device storage.

These are pointer-level launch primitives by design. Checkpoint sources are const CUDA aliases of file-backed host pages and therefore cannot be modeled faithfully by rt::Tensor, which has one mutable address and one device type. The runtime validates source metadata and Tensor destinations before calling these functions.

cudaError_t trt_edgellm::kernel::launchBf16ToFp16(
void const *dBf16,
void *dFp16,
int64_t n,
cudaStream_t stream
)#

Cast device BF16 [N] → FP16 [N] (elementwise).

cudaError_t trt_edgellm::kernel::launchFp32ToFp16(
void const *dFp32,
void *dFp16,
int64_t n,
cudaStream_t stream
)#

Cast device FP32 [N] → FP16 [N] (elementwise).

cudaError_t trt_edgellm::kernel::launchBf16ToFp32(
void const *dBf16,
void *dFp32,
int64_t n,
cudaStream_t stream
)#

Cast device BF16 [N] → FP32 [N] (elementwise).

cudaError_t trt_edgellm::kernel::launchFp16ToFp32(
void const *dFp16,
void *dFp32,
int64_t n,
cudaStream_t stream
)#

Cast device FP16 [N] → FP32 [N] (elementwise).

cudaError_t trt_edgellm::kernel::launchTransposeFp16(
void const *dSrcRowsCols,
void *dDstColsRows,
int32_t rows,
int32_t cols,
cudaStream_t stream
)#

Transpose FP16 [rows, cols][cols, rows].

cudaError_t trt_edgellm::kernel::launchBf16TransposeToFp16(
void const *dSrcBf16RowsCols,
void *dDstFp16ColsRows,
int32_t rows,
int32_t cols,
cudaStream_t stream
)#

Fused BF16 [rows, cols] → FP16 [cols, rows] (cast + transpose).

cudaError_t trt_edgellm::kernel::launchFp32TransposeToFp16(
void const *dSrcFp32RowsCols,
void *dDstFp16ColsRows,
int32_t rows,
int32_t cols,
cudaStream_t stream
)#

Fused FP32 [rows, cols] → FP16 [cols, rows].

cudaError_t trt_edgellm::kernel::launchScaleFp16(
void *dFp16,
int64_t n,
float scale,
cudaStream_t stream
)#

Scale FP16 tensor in-place by a scalar.

cudaError_t trt_edgellm::kernel::launchFillFp32(
void *dFp32,
int64_t n,
float value,
cudaStream_t stream
)#

Fill an FP32 tensor with one scalar value.

cudaError_t trt_edgellm::kernel::launchWriteFp32(
float const *values,
int32_t count,
void *dFp32,
cudaStream_t stream
)#

Write up to 256 FP32 values passed as kernel arguments.