diff --git a/Project.toml b/Project.toml index 6789517a15..233dc22db8 100644 --- a/Project.toml +++ b/Project.toml @@ -26,7 +26,7 @@ Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0" ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63" Scratch = "6c6a2e73-6563-6170-7368-637461726353" Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" -unzip_jll = "88f77b66-78eb-5ed0-bc16-ebba0796830d" +p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" [weakdeps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" @@ -115,7 +115,7 @@ Statistics = "1.10" YaoBlocks = "0.13, 0.14" Zygote = "0.7" julia = "1.10" -unzip_jll = "6" +p7zip_jll = "17" [extras] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/accelerators/Metal.jl b/src/accelerators/Metal.jl index b50bab7192..27396fd7f1 100644 --- a/src/accelerators/Metal.jl +++ b/src/accelerators/Metal.jl @@ -3,6 +3,7 @@ module Metal using Reactant: Reactant using Scratch: @get_scratch! using Downloads: Downloads +using p7zip_jll: p7zip const metal_pjrt_plugin_dir = Ref{Union{Nothing,String}}(nothing) @@ -47,7 +48,7 @@ function download_metal_pjrt_plugin_if_needed(path=nothing) end, zip_file_path, ) - run(`unzip -qq $(zip_file_path) -d $(tmp_dir)`) + run(pipeline(`$(p7zip()) x -tzip -o$(tmp_dir) -- $(zip_file_path)`, devnull)) mv( joinpath(tmp_dir, "jax_plugins", "metal_plugin", "pjrt_plugin_metal_14.dylib"), metal_pjrt_plugin_path, diff --git a/src/accelerators/TPU.jl b/src/accelerators/TPU.jl index a0b5564914..768ccd58d7 100644 --- a/src/accelerators/TPU.jl +++ b/src/accelerators/TPU.jl @@ -5,7 +5,7 @@ using EnumX: @enumx using Scratch: @get_scratch! using HTTP: HTTP using Downloads: Downloads -using unzip_jll: unzip +using p7zip_jll: p7zip const libtpu_dir = Ref{Union{Nothing,String}}(nothing) const RUNNING_IN_CLOUD_TPU_VM = Ref(false) @@ -49,7 +49,7 @@ function download_libtpu_if_needed(path=nothing) "https://storage.googleapis.com/libtpu-nightly-releases/wheels/libtpu/libtpu-0.0.28.dev20251027+nightly-cp314-cp314t-manylinux_2_31_x86_64.whl", zip_file_path, ) - run(`$(unzip()) -qq $(zip_file_path) -d $(tmp_dir)`) + run(pipeline(`$(p7zip()) x -tzip -o$(tmp_dir) -- $(zip_file_path)`, devnull)) mv(joinpath(tmp_dir, "libtpu", "libtpu.so"), libtpu_path) rm(tmp_dir; recursive=true) rm(zip_file_path; recursive=true) diff --git a/test/qa.jl b/test/qa.jl index 5fb69dea26..77cb53cdd4 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -91,7 +91,7 @@ end Reactant.Accelerators.TPU.TPUVersion, Reactant.PrecisionConfig, ), - ignore=(:unzip, :ShardyPropagationOptions), + ignore=(:p7zip, :ShardyPropagationOptions), ) === nothing end @testset "Qualified Accesses" begin