Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'get_num_inputs' to GraphRuntime #6118

Merged
merged 2 commits into from
Jul 24, 2020
Merged

Conversation

alexbooth
Copy link
Contributor

I have an app level use case that this information is useful for. Implementation mirrors the existing 'get_num_outputs' API.

@junrushao
Copy link
Member

just curious, what is it used for?

@zhiics
Copy link
Member

zhiics commented Jul 24, 2020

The number contains both inputs and weights. Is that what you want?

@alexbooth
Copy link
Contributor Author

alexbooth commented Jul 24, 2020

The number contains both inputs and weights. Is that what you want?

Yes, not just the input data but potential input weights as well. I want the length of "arg_nodes" from the graph json.
For outputs we can easily iterate over tensors with get_num_outputs() api and the get_output(index) function. This change allows the same for the existing get_input(index) function.

@MarisaKirisame MarisaKirisame merged commit bfa4eae into apache:master Jul 24, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants