Skip to content

prototype #4785

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

Closed
wants to merge 1 commit into from
Closed

prototype #4785

wants to merge 1 commit into from

Conversation

helunwencser
Copy link
Contributor

@helunwencser helunwencser commented Aug 20, 2024

This PR shows a simple repro that ET cannot mutate input tensor:

cd executorch/examples/models/phi-3-mini
  • Run in eager mode:
(executorch) [lunwenh@devvm5021.ash0 ~/executorch/examples/models/phi-3-mini (dynamic_kv_cache_example)]$ python example2.py 
x: tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])
y: tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])
  • export the model:
python example2.py -e
  • run in ET:
update model_path in executorch/examples/models/phi-3-mini/main.cpp
makedir build
cd build
cmake ..
cd ..
cmake --build build -j10
./build/phi_3_mini_runner

I 00:00:00.001573 executorch:runner.cpp:22] Created Phi-3-mini runner: model_path=/home/lunwenh/executorch/examples/models/phi-3-mini/example2.pte
I 00:00:00.001615 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001618 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001619 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001621 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001623 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001625 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001627 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001629 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001631 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001638 executorch:runner.cpp:89] Before forward x: 0
I 00:00:00.001640 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001642 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001644 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001646 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001650 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001655 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001657 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001660 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001663 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001665 executorch:runner.cpp:92] Before forward y: 1
I 00:00:00.001838 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001847 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001849 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001851 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001853 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001854 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001857 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001859 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001861 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001863 executorch:runner.cpp:109] After forward x: 0
I 00:00:00.001866 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001868 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001872 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001873 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001877 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001879 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001881 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001884 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001890 executorch:runner.cpp:112] After forward y: 1
I 00:00:00.001893 executorch:runner.cpp:112] After forward y: 1

Copy link

pytorch-bot bot commented Aug 20, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4785

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 1aab73d with merge base ce4917c (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 20, 2024
@helunwencser helunwencser force-pushed the dynamic_kv_cache_example branch 10 times, most recently from e446bcf to ffcfaa1 Compare August 21, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants