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