@@ -708,75 +708,6 @@ static const std::string cpu_pipeline =
708
708
" reconcile-unrealized-casts" ;
709
709
710
710
static const std::string gpu_pipeline =
711
- " add-gpu-regions,"
712
- " canonicalize,"
713
- " ndarray-dist,"
714
- " func.func(dist-coalesce),"
715
- " func.func(dist-infer-elementwise-cores),"
716
- " convert-dist-to-standard,"
717
- " canonicalize,"
718
- " overlap-comm-and-compute,"
719
- " add-comm-cache-keys,"
720
- " lower-distruntime-to-idtr,"
721
- " convert-ndarray-to-linalg,"
722
- " canonicalize,"
723
- " func.func(tosa-make-broadcastable),"
724
- " func.func(tosa-to-linalg),"
725
- " func.func(tosa-to-tensor),"
726
- " canonicalize,"
727
- " linalg-fuse-elementwise-ops,"
728
- " arith-expand,"
729
- " memref-expand,"
730
- " arith-bufferize,"
731
- " func-bufferize,"
732
- " func.func(empty-tensor-to-alloc-tensor),"
733
- " func.func(scf-bufferize),"
734
- " func.func(tensor-bufferize),"
735
- " func.func(bufferization-bufferize),"
736
- " func.func(linalg-bufferize),"
737
- " func.func(linalg-detensorize),"
738
- " func.func(tensor-bufferize),"
739
- " region-bufferize,"
740
- " canonicalize,"
741
- " func.func(finalizing-bufferize),"
742
- " imex-remove-temporaries,"
743
- " func.func(convert-linalg-to-parallel-loops),"
744
- " func.func(scf-parallel-loop-fusion),"
745
- // GPU
746
- " func.func(imex-add-outer-parallel-loop),"
747
- " func.func(gpu-map-parallel-loops),"
748
- " func.func(convert-parallel-loops-to-gpu),"
749
- // insert-gpu-allocs pass can have client-api = opencl or vulkan args
750
- " func.func(insert-gpu-allocs{in-regions=1}),"
751
- " drop-regions,"
752
- " canonicalize,"
753
- // "normalize-memrefs,"
754
- // "gpu-decompose-memrefs,"
755
- " func.func(lower-affine),"
756
- " gpu-kernel-outlining,"
757
- " canonicalize,"
758
- " cse,"
759
- // The following set-spirv-* passes can have client-api = opencl or vulkan
760
- // args
761
- " set-spirv-capabilities{client-api=opencl},"
762
- " gpu.module(set-spirv-abi-attrs{client-api=opencl}),"
763
- " canonicalize,"
764
- " fold-memref-alias-ops,"
765
- " imex-convert-gpu-to-spirv{enable-vc-intrinsic=1},"
766
- " spirv.module(spirv-lower-abi-attrs),"
767
- " spirv.module(spirv-update-vce),"
768
- // "func.func(llvm-request-c-wrappers),"
769
- " serialize-spirv,"
770
- " expand-strided-metadata,"
771
- " lower-affine,"
772
- " convert-gpu-to-gpux,"
773
- " convert-func-to-llvm,"
774
- " convert-math-to-llvm,"
775
- " convert-gpux-to-llvm,"
776
- " finalize-memref-to-llvm,"
777
- " reconcile-unrealized-casts" ;
778
-
779
- static const std::string cuda_pipeline =
780
711
" add-gpu-regions,"
781
712
" canonicalize,"
782
713
" ndarray-dist,"
@@ -837,9 +768,7 @@ static const std::string cuda_pipeline =
837
768
838
769
const std::string _passes (get_text_env (" SHARPY_PASSES" ));
839
770
static const std::string &pass_pipeline =
840
- _passes != " " ? _passes
841
- : (useGPU () ? (useCUDA () ? cuda_pipeline : gpu_pipeline)
842
- : cpu_pipeline);
771
+ _passes != " " ? _passes : (useGPU () ? gpu_pipeline : cpu_pipeline);
843
772
844
773
JIT::JIT (const std::string &libidtr)
845
774
: _context (::mlir::MLIRContext::Threading::DISABLED), _pm (&_context),
@@ -902,13 +831,7 @@ JIT::JIT(const std::string &libidtr)
902
831
if (!gpuxlibstr.empty ()) {
903
832
_gpulib = std::string (gpuxlibstr);
904
833
} else {
905
- if (useCUDA ()) {
906
- _gpulib = mlirRoot + " /lib/libmlir_cuda_runtime.so" ;
907
- } else {
908
- auto imexRoot = get_text_env (" IMEXROOT" );
909
- imexRoot = !imexRoot.empty () ? imexRoot : std::string (CMAKE_IMEX_ROOT);
910
- _gpulib = imexRoot + " /lib/liblevel-zero-runtime.so" ;
911
- }
834
+ _gpulib = mlirRoot + " /lib/libmlir_cuda_runtime.so" ;
912
835
if (!std::ifstream (_gpulib)) {
913
836
throw std::runtime_error (" Cannot find lib: " + _gpulib);
914
837
}
0 commit comments