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

load_method with only method name #3198

Open
victoriapoghosian opened this issue Apr 22, 2024 · 3 comments
Open

load_method with only method name #3198

victoriapoghosian opened this issue Apr 22, 2024 · 3 comments
Labels
need-user-input The issue needs more information from the reporter before moving forward

Comments

@victoriapoghosian
Copy link

Running the tutorial
https://pytorch.org/executorch/stable/running-a-model-cpp-tutorial.html

I got error
error: too few arguments to function call expected at least 2, have 1 Result<Method> method = program->load_method(method_name);

I've created model with variable shape input and seems for that I don't need to allocate memory in advance. The tutorial above could be a good candidate, but I got errors.
Could anyone help or direct to where can I find good explanation about running executorch models in C++ with variable shaped inputs.

@cccclai
Copy link
Contributor

cccclai commented Apr 25, 2024

Seems like that's the link to the stable branch. Did you check out the stable branch code or main branch? The main branch doc is https://pytorch.org/executorch/main/running-a-model-cpp-tutorial.html

@victoriapoghosian
Copy link
Author

Thanks for the response
Seems the part I'm interested in is the same in both docs.

@JacobSzwejbka
Copy link
Contributor

I've created model with variable shape input and seems for that I don't need to allocate memory in advance.

Hmm we provide the option out of the box to have users opt out of memory planning their inputs, but you still need to provide arenas for any internal activations that occur in your model. So I would expect you to still need to provide the allocator.

@JacobSzwejbka JacobSzwejbka added the need-user-input The issue needs more information from the reporter before moving forward label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-user-input The issue needs more information from the reporter before moving forward
Projects
None yet
Development

No branches or pull requests

3 participants