From c6b1b2d3649117ecd3cf29be15824b50d5d6f5c9 Mon Sep 17 00:00:00 2001 From: nhz2 Date: Tue, 4 Nov 2025 21:38:34 -0500 Subject: [PATCH 1/2] Replace unzip_jll with p7zip_jll --- Project.toml | 3 +-- src/accelerators/Metal.jl | 3 ++- src/accelerators/TPU.jl | 4 ++-- test/qa.jl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 6789517a15..cb1c2306a2 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,6 @@ Statistics = "1.10" YaoBlocks = "0.13, 0.14" Zygote = "0.7" julia = "1.10" -unzip_jll = "6" [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..1d22c7b290 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -91,7 +91,7 @@ end Reactant.Accelerators.TPU.TPUVersion, Reactant.PrecisionConfig, ), - ignore=(:unzip, :ShardyPropagationOptions), + ignore=(:ShardyPropagationOptions), ) === nothing end @testset "Qualified Accesses" begin From 3189e3d66fcd784551f09ebf74488058686aa154 Mon Sep 17 00:00:00 2001 From: nhz2 Date: Tue, 4 Nov 2025 23:52:16 -0500 Subject: [PATCH 2/2] Add compat and fix qa test --- Project.toml | 1 + test/qa.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cb1c2306a2..233dc22db8 100644 --- a/Project.toml +++ b/Project.toml @@ -115,6 +115,7 @@ Statistics = "1.10" YaoBlocks = "0.13, 0.14" Zygote = "0.7" julia = "1.10" +p7zip_jll = "17" [extras] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/test/qa.jl b/test/qa.jl index 1d22c7b290..77cb53cdd4 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -91,7 +91,7 @@ end Reactant.Accelerators.TPU.TPUVersion, Reactant.PrecisionConfig, ), - ignore=(:ShardyPropagationOptions), + ignore=(:p7zip, :ShardyPropagationOptions), ) === nothing end @testset "Qualified Accesses" begin