Created
May 9, 2024 05:57
-
-
Save BruceDai003/734d40517adcb5ab070e254c5de4eadc to your computer and use it in GitHub Desktop.
bash script to compile and run using iree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out=notes/mlir/mul_2 | |
file=mul_2 | |
iree-compile ${out}/${file}.mlir \ | |
--iree-hal-target-backends=llvm-cpu \ | |
--iree-hal-dump-executable-files-to=${out} \ | |
-o ${out}/${file}.vmfb | |
# --iree-hal-cuda-llvm-target-arch=sm_80 \ | |
# --dump-compilation-phases-to=${out} \ | |
# nsys nvprof --print-gpu-trace \ | |
iree-run-module \ | |
--device=local-task \ | |
--module=${out}/${file}.vmfb \ | |
--function=main \ | |
--input="4xf32=@${out}/input.npy" \ | |
# --output="@${out}/output_cuda.npy" | |
# --input="4xf32=[0,1,2,3]" \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment