Skip to content

Commit

Permalink
- fix use-after-move in interpreter.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
mbs-octoml committed May 24, 2022
1 parent e331964 commit 9753881
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 101 deletions.
4 changes: 2 additions & 2 deletions src/relay/backend/interpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -945,13 +945,13 @@ class Interpreter : public ExprFunctor<ObjectRef(const Expr& n)>,
* rewritten \p mod and target-specific modules containing bindings for all TIR primitive
* functions needed by the rewritten module.
*/
IRModule Prepare(IRModule mod, CompilationConfig config) {
IRModule Prepare(IRModule mod, const CompilationConfig& config) {
// Run minimal transforms on module to establish invariants needed by interpreter.
transform::Sequential seq(
{transform::SimplifyInference(), qnn::transform::Legalize(),
// Figure out which devices should be used to execute.
// TODO(mbs): Should ignore all existing annotations when constant folding
transform::PlanDevices(std::move(config)),
transform::PlanDevices(config),
// FuseOps will mark wrapped calls to prim-ops with the 'Primitive'
// attribute.
transform::FuseOps(/*fuse_opt_level=*/0),
Expand Down
97 changes: 1 addition & 96 deletions tests/python/frontend/onnx/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -6654,99 +6654,4 @@ def verify_LinearRegressor(a_shape, c_shape, i_shape, targets=1, batch=1):


if __name__ == "__main__":
test_flatten()
test_reshape()
test_shape()
test_expand()
test_power()
test_squeeze()
test_unsqueeze()
test_slice()
test_floor()
test_ceil()
test_round()
test_isinf()
test_isnan()
test_clip()
test_clip_min_max_as_inputs()
test_onehot()
test_gemm()
test_matmul()
test_matmulinteger16()
test_gather()
test_gatherelements()
test_gather_nd()
test_scatter()
test_lrn()
test_instance_norm()
test_upsample_nearest()
test_upsample_bilinear()
test_forward_min()
test_forward_max()
test_forward_mean()
test_forward_hardsigmoid()
test_forward_arg_min_max()
test_softmax()
test_constantofshape()
test_all_reduce_funcs()
test_pad()
test_split()
test_binary_ops()
test_unary_ops()
test_leaky_relu()
test_elu()
test_selu()
test_prelu()
test_ThresholdedRelu()
test_LogSoftmax()
test_resnet()
test_inception()
test_densenet()
test_sign()
test_not()
test_and()
test_tile()
test_erf()
test_where()
test_or()
test_depth_to_space()
test_space_to_depth()
test_batch_norm()
test_batch_norm_dynamic_subgraph()
test_conv()
test_convtranspose()
test_unsqueeze_constant()
test_pooling()
test_lppool()
test_lstm()
test_gru()
test_resize()
test_nonzero()
test_topk()
test_mod()
test_xor()
test_max_roi_pool()
test_roi_align()
test_range()
test_loop()
test_size()
test_maxunpool()
test_softplus()
test_cumsum()
test_wrong_input()
test_aten()
test_index_put()
test_reverse_sequence()
test_eyelike()
test_qlinearconcat()
test_qlinearconv()
test_random_uniform()
test_convinteger()
test_batch_matmul()
test_use_nt_batch_matmul()
test_global_lppool()
test_scan()
test_random_uniform_like()
test_random_normal()
test_random_normal_like()
test_LinearRegressor()
tvm.testing.main()
4 changes: 1 addition & 3 deletions tests/python/relay/dyn/test_dynamic_op_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,4 @@ def verify_pad_default_fill(dshape, pad_width, dtype):


if __name__ == "__main__":
test_dyn_pad()
test_dyn_upsampling_infer_type_const()
test_dyn_upsampling_run()
tvm.testing.main()

0 comments on commit 9753881

Please sign in to comment.