Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/accelerators/Metal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/accelerators/TPU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ end
Reactant.Accelerators.TPU.TPUVersion,
Reactant.PrecisionConfig,
),
ignore=(:unzip, :ShardyPropagationOptions),
ignore=(:p7zip, :ShardyPropagationOptions),
) === nothing
end
@testset "Qualified Accesses" begin
Expand Down
Loading