From 04513ca683019ce9eb067a92a9712af3e9c641bb Mon Sep 17 00:00:00 2001 From: ClementLinCF <162283536+ClementLinCF@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:11:29 +0800 Subject: [PATCH] Create README.md --- example/ck_tile/99_toy_example/README.md | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 example/ck_tile/99_toy_example/README.md diff --git a/example/ck_tile/99_toy_example/README.md b/example/ck_tile/99_toy_example/README.md new file mode 100644 index 0000000000..da02024f23 --- /dev/null +++ b/example/ck_tile/99_toy_example/README.md @@ -0,0 +1,55 @@ + + +# CK_TILE Toy Example + +This repository demonstrates a toy example implemented using ck_tile + +## Build Instructions + +Follow these steps to build the examples: + +```sh +cd composable_kernel +mkdir build +cd build + +cmake -D CMAKE_PREFIX_PATH=/opt/rocm \ + -D CMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \ + -D CMAKE_BUILD_TYPE=Release \ + -D GPU_TARGETS="gfx942" \ + -Dkernel=N .. +``` + +### Compile Examples + +#### **Elementwise Add Example** +```sh +make -j add +``` + +#### **GEMM Example** +```sh +make -j basic_gemm +``` + +#### **Flash Attention Forward Example** +```sh +make -j basic_flash_attention_fwd +``` + +## Running Examples + +### **Elementwise Add** +```sh +./bin/add +``` + +### **GEMM Example** +```sh +./bin/basic_gemm 1 +``` + +### **Flash Attention Forward Example** +```sh +./bin/basic_flash_attention_fwd 1 0 1 +```