Skip to content

Instantly share code, notes, and snippets.

View hebiao064's full-sized avatar
๐ŸŽ

Stefan He hebiao064

๐ŸŽ
View GitHub Profile
@hebiao064
hebiao064 / per_token_quant_fp8.cu
Created March 11, 2025 06:34
[v2] Per Token FP8 Quant Kernel handling weird hidden_dim % 8 != 0 and do cast load when hidden_dim % 8 = 0
#include <ATen/cuda/CUDAContext.h>
#include <cmath>
#include <cub/block/block_reduce.cuh>
#include <flashinfer/vec_dtypes.cuh>
#include "utils.h"
template <typename T>
__global__ void per_token_quant_fp8_kernel(
@hebiao064
hebiao064 / per_token_quant_fp8.cu
Last active March 11, 2025 06:33
[v1] Per Token FP8 Quant Kernel handling weird hidden_dim % 8 != 0 and do cast load when hidden_dim % 8 = 0
#include <ATen/cuda/CUDAContext.h>
#include <cmath>
#include <cub/block/block_reduce.cuh>
#include <flashinfer/vec_dtypes.cuh>
#include "utils.h"
template <typename T>
__global__ void per_token_quant_fp8_kernel(