Skip to content

Commit

Permalink
bench: Update names
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Oct 23, 2023
1 parent f2f9044 commit 9256d74
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion devito/operator/xdsl_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

XDSL_CPU_PIPELINE = lambda nb_tiled_dims: f'"stencil-shape-inference,convert-stencil-to-ll-mlir{{tile-sizes={",".join(["64"]*nb_tiled_dims)}}},printf-to-llvm"'
XDSL_GPU_PIPELINE = "stencil-shape-inference,convert-stencil-to-ll-mlir{target=gpu},reconcile-unrealized-casts,printf-to-llvm"
XDSL_MPI_PIPELINE = lambda decomp, nb_tiled_dims: f'"dmp-decompose-2d{decomp},canonicalize-dmp,convert-stencil-to-ll-mlir{{tile-sizes={",".join(["64"]*nb_tiled_dims)}}},dmp-to-mpi{{mpi_init=false}},lower-mpi,printf-to-llvm"'
XDSL_MPI_PIPELINE = lambda decomp, nb_tiled_dims: f'"dmp-decompose{decomp},canonicalize-dmp,convert-stencil-to-ll-mlir{{tile-sizes={",".join(["64"]*nb_tiled_dims)}}},dmp-to-mpi{{mpi_init=false}},lower-mpi,printf-to-llvm"'


class XDSLOperator(Operator):
Expand Down
4 changes: 2 additions & 2 deletions fast/diffusion_2D_wBCs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
init_hat(field=u.data[0], dx=dx, dy=dy, value=1.)

if args.devito:
op = Operator([eq_stencil], name='DevitoOperator')
op = Operator([eq_stencil], name='DevitoDiffusionOperator')
op.apply(time=nt, dt=dt, a=nu)
print("Devito Field norm is:", norm(u))

Expand All @@ -65,6 +65,6 @@
init_hat(field=u.data[0], dx=dx, dy=dy, value=1.)

if args.xdsl:
xdslop = XDSLOperator([eq_stencil], name='XDSLOperator')
xdslop = XDSLOperator([eq_stencil], name='XDSLDiffusionOperator')
xdslop.apply(time=nt, dt=dt, a=nu)
print("XDSL Field norm is:", norm(u))
4 changes: 2 additions & 2 deletions fast/diffusion_3D_wBCs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
if args.devito:
u.data[:, :, :, :] = 0
u.data[:, :, :, int(nz/2)] = 1
op = Operator([eq_stencil], name='DevitoOperator')
op = Operator([eq_stencil], name='DevitoDiffusionOperator')
# Apply the operator for a number of timesteps
op.apply(time=nt, dt=dt, a=nu)
print("Devito Field norm is:", norm(u))
Expand All @@ -67,7 +67,7 @@
# Reset field
u.data[:, :, :, :] = 0
u.data[:, :, :, int(nz/2)] = 1
xdslop = XDSLOperator([eq_stencil], name='xDSLOperator')
xdslop = XDSLOperator([eq_stencil], name='xDSLDiffusionOperator')
# Apply the xdsl operator for a number of timesteps
xdslop.apply(time=nt, dt=dt, a=nu)
print("XDSL Field norm is:", norm(u))
Expand Down
4 changes: 4 additions & 0 deletions fast/slurm-jobs/wave-1.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export SLURM_CPU_FREQ_REQ=2250000
# Additional srun options to pin one thread per physical core



# DEVITO_MPI=0 python setup_wave3d.py -d 1024 1024 1024 --nt 512 -so 2
# DEVITO_MPI=0 python setup_wave3d.py -d 1024 1024 1024 --nt 512 -so 4
# DEVITO_MPI=0 python setup_wave3d.py -d 1024 1024 1024 --nt 512 -so 8

DEVITO_MPI=diag2 srun --distribution=block:block --hint=nomultithread python3 wave3d_b.py -d 1024 1024 1024 --nt 512 -so 4 --devito 1
srun --distribution=block:block --hint=nomultithread python3 wave3d_b.py -d 1024 1024 1024 --nt 512 -so 4 --xdsl 1

0 comments on commit 9256d74

Please sign in to comment.