Skip to content

Commit

Permalink
bench: more cleanup, drop redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Jul 19, 2023
1 parent 51dbc2d commit fe1650c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 147 deletions.
2 changes: 1 addition & 1 deletion devito/ir/ietxdsl/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _convert_eq(self, eq: LoweredEq):
), f"can only write to offset [0,0,0], given {offsets[1:]}"

self.block.add_op(stencil.ReturnOp.get([rhs_result]))
outermost_block.add_op(func.Return.get())
outermost_block.add_op(func.Return())

return func.FuncOp.from_region(
"apply_kernel", [], [], Region([outermost_block])
Expand Down
2 changes: 1 addition & 1 deletion devito/ir/ietxdsl/xdsl_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _op_to_func(op: Operator):
ietxdsl_functions.myVisit(i, block=block, ssa_vals=ssa_val_dict)

# add a trailing return
block.add_op(func.Return.get())
block.add_op(func.Return())

func_op = func.FuncOp.from_region(str(op.name), arg_types, [], Region([block]))

Expand Down
8 changes: 2 additions & 6 deletions fast/nd_nwave_devito_nodamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,16 @@ def plot_3dfunc(u):

# Finally we define the source injection and receiver read function to generate
# the corresponding code
print(time_range)
src_term = src.inject(field=u.forward, expr=src * dt**2 / model.m)
op = Operator([stencil] + src_term, subs=model.spacing_map)

print(time_range)
# Run with source and plot
# import pdb;pdb.set_trace()
op.apply(time=time_range.num-1, dt=model.critical_dt)

if len(shape) == 3:
if args.plot:
plot_3dfunc(u)


initdata = u.data[:]

# Run more with no sources now (Not supported in xdsl)
Expand All @@ -127,10 +124,9 @@ def plot_3dfunc(u):

print(norm(u))


# Reset initial data
u.data[:] = initdata


# Run more with no sources now (Not supported in xdsl)
xdslop = XDSLOperator([stencil])
xdslop.apply(time=time_range.num-1, dt=model.critical_dt)
Expand Down
139 changes: 0 additions & 139 deletions fast/nd_wave_devito_nodamp.py

This file was deleted.

0 comments on commit fe1650c

Please sign in to comment.