Makefile 2.0 KB
Newer Older
1
PARAM_DEFS := ../src/common/elemwise/each_mode.inl
2 3 4 5

ELEMWISE_IMPL := ../src/cuda/cond_take/kimpl \
	../src/cuda/elemwise/special_kimpl \
	../src/cuda/elemwise/kimpl \
6 7
	../src/rocm/elemwise/special_kimpl \
	../src/rocm/elemwise/kimpl \
8 9 10
	../src/naive/elemwise/kimpl \
	../src/cuda/elemwise_multi_type/kimpl

11
CUDA_CONV_IMPL := ../src/cuda/conv_bias/int8/kimpl ../src/cuda/conv_bias/int8_imma/kimpl ../src/cuda/batch_conv_bias/int8/kimpl 
12
CUDA_MATMUL_IMPL := ../src/cuda/matrix_mul/fp32_simt/kimpl ../src/cuda/matrix_mul/fp32_simt_gemv/kimpl
13

14
all: ${PARAM_DEFS} ${ELEMWISE_IMPL} ${CUDA_CONV_IMPL} $(CUDA_MATMUL_IMPL)
15 16 17 18 19 20 21 22 23 24

../src/common/elemwise/each_mode.inl: gen_elemwise_each_mode.py
	./$^ $@

../src/cuda/cond_take/kimpl: gen_cond_take_kern_impls.py
	./$^ --type cuda $@

../src/cuda/elemwise/special_kimpl: gen_elemwise_special_kern_impls.py
	./$^ --type cuda $@

25 26
../src/rocm/elemwise/special_kimpl: gen_elemwise_special_kern_impls.py
	./$^ --type hip $@
27 28 29 30

../src/cuda/elemwise/kimpl: gen_elemwise_kern_impls.py
	./$^ --type cuda $@

31 32
../src/rocm/elemwise/kimpl: gen_elemwise_kern_impls.py
	./$^ --type hip $@
33 34 35 36 37 38 39

../src/%/elemwise/kimpl: gen_elemwise_kern_impls.py
	./$^ $@

../src/cuda/elemwise_multi_type/kimpl: gen_elemwise_multi_type_kern_impls.py
	./$^ --type cuda $@

40
../src/cuda/conv_bias/int8/kimpl: gen_cuda_conv_bias_kern_impls.py gen_cutlass_conv_bias_kern_impls.py cutlass_generator/generator.py
41 42
	./gen_cuda_conv_bias_kern_impls.py --type dp4a $@
	./gen_cutlass_conv_bias_kern_impls.py --type dp4a $@
43
	python3 ./cutlass_generator/generator.py --operations all --type simt $@
44

45 46 47
../src/cuda/conv_bias/int8_imma/kimpl: gen_cuda_conv_bias_kern_impls.py gen_cutlass_conv_bias_kern_impls.py
	./gen_cuda_conv_bias_kern_impls.py --type imma $@
	./gen_cutlass_conv_bias_kern_impls.py --type imma $@
48

49
../src/cuda/batch_conv_bias/int8/kimpl: gen_cuda_batch_conv_bias_kern_impls.py 
50 51
	./$^ --type dp4a $@

52 53 54
../src/cuda/matrix_mul/fp32_simt/kimpl: gen_cutlass_matmul_kern_impls.py
	./$^ $@

55 56 57
../src/cuda/matrix_mul/fp32_simt_gemv/kimpl: gen_cutlass_gemv_batched_strided_kern_impls.py
	./$^ $@

58
.PHONY: all