From 6086ead2f9d868a683bf0f07f3739ce00b74e818 Mon Sep 17 00:00:00 2001 From: Qianfeng Zhang Date: Thu, 17 Apr 2025 10:33:44 +0000 Subject: [PATCH] Add scripts for comparing with triton --- .../18_hstu_attention/compare_with_trition.sh | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 example/ck_tile/18_hstu_attention/compare_with_trition.sh diff --git a/example/ck_tile/18_hstu_attention/compare_with_trition.sh b/example/ck_tile/18_hstu_attention/compare_with_trition.sh new file mode 100644 index 0000000000..1d8ee5222b --- /dev/null +++ b/example/ck_tile/18_hstu_attention/compare_with_trition.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +BUILD=build +EXE=$BUILD/bin/tile_example_hstu_attention + +dtype="bf16" +hdim=128 +num_batch=32 +num_head=4 + +for seqlen in 1024 2048 4096 8192 16384 32768; do + set -x + + ## no causal + $EXE -v=0 -prec=$dtype -b=$num_batch -jagged=0 -nhead=$num_head -hdim_qk=$hdim -hdim_v=$hdim -seqlen=$seqlen -causal=0 -local_len=0 -context_len=0 -minfull_len=0 -targets=0 -perf=1 + + ## has causal + $EXE -v=0 -prec=$dtype -b=$num_batch -jagged=0 -nhead=$num_head -hdim_qk=$hdim -hdim_v=$hdim -seqlen=$seqlen -causal=1 -local_len=0 -context_len=0 -minfull_len=0 -targets=0 -perf=1 + set +x +done