data: complete SGEMM upstream from 3 repos (siboehm+wangzyon+edtallison) + xllm fused_qknorm_rope + xattention kernels
SGEMM repos (upstream_ref/sgemm_cuda/, 41 files): siboehm/SGEMM_CUDA: kernel 1-12, runner, CMake, cuBLAS benchmark wangzyon/NVIDIA_SGEMM_PRACTICE: kernel 1-7 (Chinese comments), utils edtallison/sgemm-cuda: kernel 01-09 (learning notes), Makefile xllm kernels (ex_engine/xllm_kernels/cuda/): fused_qknorm_rope.cu + bind — saves 128 kernel launches/fwd xattention/ — 6 files from upstream xllm headers: corex_compat_utils.h, topk_last_dim.cuh ilu/CMakeLists.txt SO_BUILD_MANIFEST.md — complete .so inventory and call chain analysis
This commit is contained in:
37
ex_engine/xllm_kernels/cuda/headers/corex_compat_utils.h
Normal file
37
ex_engine/xllm_kernels/cuda/headers/corex_compat_utils.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// corex_compat_utils.h — Lightweight replacement for xllm's utils.h
|
||||
// Removes glog/tvm dependencies for BI-V100 corex compilation
|
||||
// Provides CHECK macro via TORCH_CHECK and DISPATCH macros from device_utils.cuh
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <torch/torch.h>
|
||||
#include <c10/cuda/CUDAGuard.h>
|
||||
|
||||
// Replace glog CHECK with TORCH_CHECK
|
||||
#ifndef CHECK
|
||||
#define CHECK(cond) TORCH_CHECK(cond)
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_EQ
|
||||
#define CHECK_EQ(a, b) TORCH_CHECK((a) == (b))
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_GE
|
||||
#define CHECK_GE(a, b) TORCH_CHECK((a) >= (b))
|
||||
#endif
|
||||
|
||||
// Include device_utils for DISPATCH_HALF_TYPES etc
|
||||
#include "device_utils.cuh"
|
||||
|
||||
// ffi namespace stub (some headers reference it)
|
||||
namespace ffi {
|
||||
template <typename T>
|
||||
using Array = std::vector<T>;
|
||||
}
|
||||
|
||||
// HOST_DEVICE_INLINE
|
||||
#if defined(__CUDACC__) || defined(_NVHPC_CUDA)
|
||||
#define HOST_DEVICE_INLINE __host__ __device__ __forceinline__
|
||||
#else
|
||||
#define HOST_DEVICE_INLINE inline
|
||||
#endif
|
||||
2114
ex_engine/xllm_kernels/cuda/headers/topk_last_dim.cuh
Normal file
2114
ex_engine/xllm_kernels/cuda/headers/topk_last_dim.cuh
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user