You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/10/07 21:25:59 UTC

[GitHub] [tvm] mehrdadh opened a new issue, #13013: [Runtime][AOTExecutor] set_input does not show error if input name is incorrect

mehrdadh opened a new issue, #13013:
URL: https://github.com/apache/tvm/issues/13013

   If we pass input dictionary with incorrect input name, aot executor would execute `set_input` function without actually setting the correct input or showing error that input name doesn't exist in the model. This will result in silently outputting the incorrect output from the model. I think it should show an error when the input name doesn't exist.
   
   I found this error when I working on a model which had input name of `input:0` which is not acceptable in Relay. However, when I tested it I realized it's not just this name, if you pass any name for the input the AOTExecutor would accept it.
   
   cc @areusch @alanmacd 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh closed issue #13013: [Runtime][AOTExecutor] set_input does not show error if input name does not exist in the model

Posted by "mehrdadh (via GitHub)" <gi...@apache.org>.
mehrdadh closed issue #13013: [Runtime][AOTExecutor] set_input does not show error if input name does not exist in the model
URL: https://github.com/apache/tvm/issues/13013


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh commented on issue #13013: [Runtime][AOTExecutor] set_input does not show error if input name does not exist in the model

Posted by GitBox <gi...@apache.org>.
mehrdadh commented on issue #13013:
URL: https://github.com/apache/tvm/issues/13013#issuecomment-1274973295

   @alanmacd I have tested this on AOT with C++ and it doesn't show any error. It might also be a problem with CRT.
   To reproduce the error, you can use this test: https://github.com/apache/tvm/blob/0b034d77bd611ca7642b7211fa34110a87271f25/tests/python/relay/aot/test_cpp_aot.py#L54
   
   If you apply this modification, then the test fails because the output is incorrect but you don't see any error regarding passing data to the wrong input name.
    
   ```
   diff --git a/tests/python/relay/aot/test_cpp_aot.py b/tests/python/relay/aot/test_cpp_aot.py
   index b67bc90d3..44d336d88 100644
   --- a/tests/python/relay/aot/test_cpp_aot.py
   +++ b/tests/python/relay/aot/test_cpp_aot.py
   @@ -90,7 +90,7 @@ def test_conv2d(enable_usmp, target_kind):
        weight_data = np.random.randint(1, 255, shape_dict["weight"]).astype(type_dict["weight"])
        input_data = np.ones(shape_dict["data"]).astype(type_dict["data"])
        params = {"weight": weight_data}
   -    inputs = {"data": input_data}
   +    inputs = {"data1": input_data}
        ref_outputs = generate_ref_data(ir_mod, inputs, params)
    
        with tvm.transform.PassContext(
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] alanmacd commented on issue #13013: [Runtime][AOTExecutor] set_input does not show error if input name does not exist in the model

Posted by GitBox <gi...@apache.org>.
alanmacd commented on issue #13013:
URL: https://github.com/apache/tvm/issues/13013#issuecomment-1272104925

   @mehrdadh which flavor of AoT executor is this, also can you post some example code that shows the issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org