The passes gpu-to-(cubin|hsaco)
are now considered deprecated and have been removed from mlir-opt
in favor of the GPU compilation attributes workflow; see the pull request. All new tests and significant contributions should use the new workflow.
Users can still enable these passes in mlir-opt
using the CMake flag MLIR_ENABLE_DEPRECATED_GPU_SERIALIZATION
; this option is there to diminish disruptions during the transition. However, these passes are going to be removed in a future release.
How can users migrate to the new workflow?
Substitute --gpu-to-(cubin|hsaco)
for --(nvvm|rocdl)-attach-target
, then add --gpu-module-to-binary
after --gpu-to-llvm
.
Example:
Traditional workflow:
mlir-opt gpu.mlir
--convert-gpu-to-nvvm \ # --convert-gpu-to-rocdl
--gpu-to-cubin \ # --gpu-to-hsaco
--gpu-to-llvm
New workflow:
mlir-opt gpu.mlir
--convert-gpu-to-nvvm \ # --convert-gpu-to-rocdl
--nvvm-attach-target \ # --rocdl-attach-target
--gpu-to-llvm \
--gpu-module-to-binary