Skip to content

Commit

Permalink
bench: Load dt to XDSL
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Aug 5, 2023
1 parent fd312d5 commit 8db89d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fast/diffusion_3D_wBCs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def plot_3dfunc(u):
x, y, z = grid.dimensions
t = grid.stepping_dim

print(eq_stencil)
# print(eq_stencil)

# Create Operator
if args.devito:
Expand Down
9 changes: 4 additions & 5 deletions fast/wave2d_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,14 @@
# np.save("critical_dt%s.npy" % shape_str, model.critical_dt, allow_pickle=True)
# np.save("wave_dat%s.npy" % shape_str, u.data[:], allow_pickle=True)

if len(shape) == 2:
if args.plot:
plot_2dfunc(u)
if len(shape) == 2 and args.plot:
plot_2dfunc(u)

print("Init norm:", np.linalg.norm(u.data[:]))

if args.devito:
# Run more with no sources now (Not supported in xdsl)
#op1 = Operator([stencil], name='DevitoOperator', subs=grid.spacing_map)
# op1 = Operator([stencil], name='DevitoOperator', subs=grid.spacing_map)
op1 = Operator([stencil], name='DevitoOperator')
op1.apply(time=nt, dt=dt)

Expand Down Expand Up @@ -128,7 +127,7 @@

# Run more with no sources now (Not supported in xdsl)
xdslop = Operator([stencil], name='xDSLOperator')
xdslop.apply(time=nt)
xdslop.apply(time=nt, dt=dt)

if len(shape) == 2 and args.plot:
plot_2dfunc(u)
Expand Down

0 comments on commit 8db89d7

Please sign in to comment.