executorch icon indicating copy to clipboard operation
executorch copied to clipboard

load_method with only method name

Open victoriapoghosian opened this issue 1 year ago • 3 comments

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.

victoriapoghosian avatar Apr 22 '24 13:04 victoriapoghosian

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

cccclai avatar Apr 25 '24 18:04 cccclai

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

victoriapoghosian avatar Apr 29 '24 11:04 victoriapoghosian

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 avatar May 09 '24 18:05 JacobSzwejbka