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:
34
upstream_ref/sgemm_cuda/Makefile_edtallison
Normal file
34
upstream_ref/sgemm_cuda/Makefile_edtallison
Normal file
@@ -0,0 +1,34 @@
|
||||
.PHONY: all build debug clean profile bench cuobjdump
|
||||
|
||||
CMAKE := cmake
|
||||
|
||||
BUILD_DIR := build
|
||||
BENCHMARK_DIR := benchmark_results
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
@cd $(BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Release ..
|
||||
@$(MAKE) -C $(BUILD_DIR)
|
||||
|
||||
debug:
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
@cd $(BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Debug ..
|
||||
@$(MAKE) -C $(BUILD_DIR)
|
||||
|
||||
clean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
FUNCTION := $$(cuobjdump -symbols build/sgemm | grep -i Warptiling | awk '{print $$NF}')
|
||||
|
||||
cuobjdump: build
|
||||
@cuobjdump -arch sm_86 -sass -fun $(FUNCTION) build/sgemm | c++filt > build/cuobjdump.sass
|
||||
@cuobjdump -arch sm_86 -ptx -fun $(FUNCTION) build/sgemm | c++filt > build/cuobjdump.ptx
|
||||
|
||||
# Usage: make profile KERNEL=<integer> PREFIX=<optional string>
|
||||
profile: build
|
||||
@ncu --set full --export $(BENCHMARK_DIR)/$(PREFIX)kernel_$(KERNEL) --force-overwrite $(BUILD_DIR)/sgemm $(KERNEL)
|
||||
|
||||
bench: build
|
||||
@bash gen_benchmark_results.sh
|
||||
Reference in New Issue
Block a user