Skip to content

Fix Debug Handle Map Typing #363

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

Conversation

Jack-Khuu
Copy link
Contributor

Summary:
The intended typing for PreprocessResult.debug_handle_map was

Dict[int, Tuple[int, ...]] || Dict[str, Tuple[int, ...]]

Since the delegate identifier can be either a string or int and maps to a Int Tuple of variable length

This fixes the type and gets rid of the pyre ignore

Reviewed By: digantdesai, cccclai

Differential Revision: D49300700

Summary:
The intended typing for PreprocessResult.debug_handle_map was
```
Dict[int, Tuple[int, ...]] || Dict[str, Tuple[int, ...]]
```
Since the delegate identifier can be either a string or int and maps to a Int Tuple of variable length

This fixes the type and gets rid of the pyre ignore

Reviewed By: digantdesai, cccclai

Differential Revision: D49300700
@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 Sep 15, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49300700

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 31a96ea.

Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Summary:
This diff
- refactors install_et.sh into a bunch of utils
- Uses those utils in build_android.sh to minimize duplication.
- Makes sure taht we are building with custom sdpa op

Test Plan:

Model export
python export.py --quant '{"linear:a8w4dq" : {"groupsize": 256}}'
--checkpoint-path /home/kimishpatel/models/llama2/stories/stories110M.pt
--params-path /home/kimishpatel/models/llama2/stories/params.json
--output-pte-path /tmp/stories110m_a8w4dq.pte
python utils/tokenizer.py --tokenizer-model=/tmp/tokenizer.model

linux:
./scripts/install_et.sh
rm -rf build/cmake-out/
cmake -S ./runner-et -B build/cmake-out -G Ninja
cmake --build ./build/cmake-out

./build/cmake-out/runner_et /tmp/stories110m_a8w4dq.pte -z /tmp/tokenizer.bin -t 0 -n 120

android:
./runner-et/build_android.sh
adb push ./build/cmake-out-android/runner_et /data/local/tmp/
adb push /tmp/stories110m_a8w4dq.pte /data/local/tmp/
adb push /tmp/tokenizer.bin /data/local/tmp/
adb shell "cd /data/local/tmp && ./runner_et ./stories110m_a8w4dq.pte -z
./tokenizer.bin -t 0 -n 120"

Will add build commands to ci in the next PR

Reviewers:

Subscribers:

Tasks:

Tags:
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. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants