ROCm / aotriton

Ahead of Time (AOT) Triton Math Library
MIT License
42 stars 15 forks source link

Kernel Storage V2 #50

Closed xinyazhang closed 2 weeks ago

xinyazhang commented 1 month ago

The Kernel Storage V2 achieves the following goals

Major changes:

Minor changes:

jithunnair-amd commented 3 weeks ago

@ethanwee1 to help with testing of building AOTriton using this PR with and without AOTRITON_NOIMAGE_MODE=ON

jithunnair-amd commented 2 weeks ago

Changes for this PR tested using PR 51: https://github.com/ROCm/aotriton/pull/51#issuecomment-2474522402

ethanwee1 commented 2 weeks ago

Tested with these commands to build aotriton-e278d4a853170c7a9063cfe847419414cb7b62b6-manylinux_2_28_x86_64-rocm6.2-shared.tar.gz

Commands:

git clone https://github.com/ROCm/aotriton.git
cd aotriton/
git checkout xinyazhang/manylinux_2_28-dockerfile
cd dockerfile/
export AMDGPU_INSTALLER=https://repo.radeon.com/amdgpu-install/6.2.4/el/8.10/amdgpu-install-6.2.60204-1.el8.noarch.rpm
mkdir -p output
cd input
vi install_aotriton.sh
added -DAOTRITON_NOIMAGE_MODE=ON

TRITON_LLVM_HASH="b5cc222d"  bash build.sh input tmpfs output e278d4a853170c7a9063cfe847419414cb7b62b6 "MI300X;MI200" 2>&1 | tee buildlog2.log
tar tvf output/*.tar*

Output: Size: 1.6MB aotriton-e278d4a853170c7a9063cfe847419414cb7b62b6-manylinux_2_28_x86_64-rocm6.2-shared.tar.gz buildlogNOIMAGE.log

jithunnair-amd commented 2 weeks ago

Output: Size: 107MB aotriton-e278d4a853170c7a9063cfe847419414cb7b62b6-manylinux_2_28_x86_64-rocm6.2-shared_WITHAOTRITON_NOIMAGE_MODE_ON.txt buildlog2.log

@ethanwee1 This doesn't look right. The tarball size and txt file indicate that kernel images are still being built. Either your experiement was faulty or the AOTRITON_NOIMAGE_MODE logic is faulty. @xinyazhang, thoughts?

xinyazhang commented 2 weeks ago

Output: Size: 107MB aotriton-e278d4a853170c7a9063cfe847419414cb7b62b6-manylinux_2_28_x86_64-rocm6.2-shared_WITHAOTRITON_NOIMAGE_MODE_ON.txt buildlog2.log

@ethanwee1 This doesn't look right. The tarball size and txt file indicate that kernel images are still being built. Either your experiement was faulty or the AOTRITON_NOIMAGE_MODE logic is faulty. @xinyazhang, thoughts?

I think you need to download the log for review since it's rather large and likely get truncated if viewing with a browser. The trailing -- Install configuration: "Release" lines have indicated this project installed to the target directory.

The size is right. I only specified two architectures and 100MB is about the right size for 2 arches under Kernel Storage V2.

(However non-square causal masks added some more kernels and two arches ~= 130MB when releasing 0.8b)

xinyazhang commented 2 weeks ago

AOTRITON_NOIMAGE_MODE will be tested in another dockerfile related PRs

jithunnair-amd commented 2 weeks ago

Output: Size: 107MB aotriton-e278d4a853170c7a9063cfe847419414cb7b62b6-manylinux_2_28_x86_64-rocm6.2-shared_WITHAOTRITON_NOIMAGE_MODE_ON.txt buildlog2.log

@ethanwee1 This doesn't look right. The tarball size and txt file indicate that kernel images are still being built. Either your experiement was faulty or the AOTRITON_NOIMAGE_MODE logic is faulty. @xinyazhang, thoughts?

I think you need to download the log for review since it's rather large and likely get truncated if viewing with a browser. The trailing -- Install configuration: "Release" lines have indicated this project installed to the target directory.

The size is right. I only specified two architectures and 100MB is about the right size for 2 arches under Kernel Storage V2.

(However non-square causal masks added some more kernels and two arches ~= 130MB when releasing 0.8b)

Just to resolve the confusion here, I was referring to Ethan's initial numbers for the AOTRITON_NOIMAGE_MODE=ON build. He corrected his build steps thereafter and updated his comment to show that the new size is only 1.6MB, which is what I expected. So, in summary, looks like AOTRITON_NOIMAGE_MODE=ON is working as expected.