Skip to content

Add Artifacts.toml for the npy files #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
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
15 changes: 15 additions & 0 deletions benchmarks/Artifacts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[punched_pmn]
git-tree-sha1 = "f225ac0deac2e86eebd5b79884fa74aae3b0772c"
lazy = true

[[punched_pmn.download]]
sha256 = "71a26d6799a1f60cc4dd2f56a670c903b8fad483a5752beb85495de55f7d7844"
url = "https://github.com/exanauts/CompressedSensingIPM-data/raw/refs/heads/main/punched_pmn.tar.gz"

[z3d_movo]
git-tree-sha1 = "94c7cdf175da37afc308dd73bb6ab3df58bb5e71"
lazy = true

[[z3d_movo.download]]
sha256 = "42c844714629e3f5fb0e2fa6a65a1443cc04d90705ccfc7aa736bb30eb9ec6e3"
url = "https://github.com/exanauts/CompressedSensingIPM-data/raw/refs/heads/main/z3d_movo.tar.gz"
2 changes: 1 addition & 1 deletion benchmarks/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.11.5"
manifest_format = "2.0"
project_hash = "2666337025370a30df588af12f9e237460cb4cef"
project_hash = "494b26c5879bbcc087d16564fa42a65dc3279867"

[[deps.AMD]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"]
Expand Down
1 change: 1 addition & 0 deletions benchmarks/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
LaplaceInterpolation = "afb1b68e-e51f-4e49-a799-0e085170423d"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
MadNLPGPU = "d72a61cc-809d-412f-99be-fd81f4b8a598"
Expand Down
12 changes: 8 additions & 4 deletions benchmarks/crystal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ using LinearAlgebra, SparseArrays
using LaplaceInterpolation, NPZ
using DelimitedFiles
using MadNLP, MadNLPGPU, CUDA
using Test
using Test, LazyArtifacts

include("../test/fft_wei.jl")
include("../test/punching_centering.jl")

function ipm_solve!(solver::MadNLP.MadNLPSolver)
MadNLP.print_init(solver)
Expand All @@ -27,7 +30,7 @@ function punch_3D_cart(center, radius, x, y, z; linear = false)
end
end

function fft_vishwas(z3d; variant::Bool=false, gpu::Bool=false, rdft::Bool=false)
function crystal(z3d; variant::Bool=false, gpu::Bool=false, rdft::Bool=false)
if !variant
dx = 0.02
dy = 0.02
Expand Down Expand Up @@ -128,8 +131,9 @@ end
gpu = true
rdft = false
variant = true
z3d = variant ? npzread("../punched_pmn") : npzread("../z3d_movo.npy")
nlp, solver, results, timer = fft_vishwas(z3d; variant, gpu, rdft)
path_z3d = variant ? joinpath(artifact"punched_pmn", "punched_pmn.npy") : joinpath(artifact"z3d_movo", "z3d_movo.npy")
z3d = npzread(path_z3d)
nlp, solver, results, timer = crystal(z3d; variant, gpu, rdft)
N = length(results.solution) ÷ 2
beta_MadNLP = results.solution[1:N]
println("Timer: $(timer)")
Expand Down
Loading