@@ -717,75 +717,6 @@ static const std::string cpu_pipeline =
717717 " reconcile-unrealized-casts" ;
718718
719719static const std::string gpu_pipeline =
720- " add-gpu-regions,"
721- " canonicalize,"
722- " ndarray-dist,"
723- " func.func(dist-coalesce),"
724- " func.func(dist-infer-elementwise-cores),"
725- " convert-dist-to-standard,"
726- " canonicalize,"
727- " overlap-comm-and-compute,"
728- " add-comm-cache-keys,"
729- " lower-distruntime-to-idtr,"
730- " convert-ndarray-to-linalg,"
731- " canonicalize,"
732- " func.func(tosa-make-broadcastable),"
733- " func.func(tosa-to-linalg),"
734- " func.func(tosa-to-tensor),"
735- " canonicalize,"
736- " linalg-fuse-elementwise-ops,"
737- " arith-expand,"
738- " memref-expand,"
739- " arith-bufferize,"
740- " func-bufferize,"
741- " func.func(empty-tensor-to-alloc-tensor),"
742- " func.func(scf-bufferize),"
743- " func.func(tensor-bufferize),"
744- " func.func(bufferization-bufferize),"
745- " func.func(linalg-bufferize),"
746- " func.func(linalg-detensorize),"
747- " func.func(tensor-bufferize),"
748- " region-bufferize,"
749- " canonicalize,"
750- " func.func(finalizing-bufferize),"
751- " imex-remove-temporaries,"
752- " func.func(convert-linalg-to-parallel-loops),"
753- " func.func(scf-parallel-loop-fusion),"
754- // GPU
755- " func.func(imex-add-outer-parallel-loop),"
756- " func.func(gpu-map-parallel-loops),"
757- " func.func(convert-parallel-loops-to-gpu),"
758- // insert-gpu-allocs pass can have client-api = opencl or vulkan args
759- " func.func(insert-gpu-allocs{in-regions=1}),"
760- " drop-regions,"
761- " canonicalize,"
762- // "normalize-memrefs,"
763- // "gpu-decompose-memrefs,"
764- " func.func(lower-affine),"
765- " gpu-kernel-outlining,"
766- " canonicalize,"
767- " cse,"
768- // The following set-spirv-* passes can have client-api = opencl or vulkan
769- // args
770- " set-spirv-capabilities{client-api=opencl},"
771- " gpu.module(set-spirv-abi-attrs{client-api=opencl}),"
772- " canonicalize,"
773- " fold-memref-alias-ops,"
774- " imex-convert-gpu-to-spirv{enable-vc-intrinsic=1},"
775- " spirv.module(spirv-lower-abi-attrs),"
776- " spirv.module(spirv-update-vce),"
777- // "func.func(llvm-request-c-wrappers),"
778- " serialize-spirv,"
779- " expand-strided-metadata,"
780- " lower-affine,"
781- " convert-gpu-to-gpux,"
782- " convert-func-to-llvm,"
783- " convert-math-to-llvm,"
784- " convert-gpux-to-llvm,"
785- " finalize-memref-to-llvm,"
786- " reconcile-unrealized-casts" ;
787-
788- static const std::string cuda_pipeline =
789720 " add-gpu-regions,"
790721 " canonicalize,"
791722 " ndarray-dist,"
@@ -846,9 +777,7 @@ static const std::string cuda_pipeline =
846777
847778const std::string _passes (get_text_env (" SHARPY_PASSES" ));
848779static const std::string &pass_pipeline =
849- _passes != " " ? _passes
850- : (useGPU () ? (useCUDA () ? cuda_pipeline : gpu_pipeline)
851- : cpu_pipeline);
780+ _passes != " " ? _passes : (useGPU () ? gpu_pipeline : cpu_pipeline);
852781
853782JIT::JIT (const std::string &libidtr)
854783 : _context (::mlir::MLIRContext::Threading::DISABLED), _pm (&_context),
@@ -911,13 +840,7 @@ JIT::JIT(const std::string &libidtr)
911840 if (!gpuxlibstr.empty ()) {
912841 _gpulib = std::string (gpuxlibstr);
913842 } else {
914- if (useCUDA ()) {
915- _gpulib = mlirRoot + " /lib/libmlir_cuda_runtime.so" ;
916- } else {
917- auto imexRoot = get_text_env (" IMEXROOT" );
918- imexRoot = !imexRoot.empty () ? imexRoot : std::string (CMAKE_IMEX_ROOT);
919- _gpulib = imexRoot + " /lib/liblevel-zero-runtime.so" ;
920- }
843+ _gpulib = mlirRoot + " /lib/libmlir_cuda_runtime.so" ;
921844 if (!std::ifstream (_gpulib)) {
922845 throw std::runtime_error (" Cannot find lib: " + _gpulib);
923846 }
0 commit comments