Move examples/models/... out of the `torch` namespace (#5318)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5318 The code under examples/... is a proxy for user code, and users should never declare code under the `torch::` or `executorch::` namespaces. Move this code under the `example::` namespace to make it more clear that users should use their own namespaces when writing code like this. I made one non-mechanical change in llama_tiktoken.h: we should always use `enum class` to avoid polluting the parent namespace, and enum values should follow UpperSnakeCase. Tests: Should be a no-op; CI passes. Prints no output: ``` find examples/models -type f | xargs grep "namespace torch" find examples/models -type f | xargs grep "namespace executorch" ``` Build llava_main: ``` bash .ci/scripts/test_llava.sh ``` Reviewed By: larryliu0820 Differential Revision: D62591348 fbshipit-source-id: 8da987245bf777ced16000f681b54652939cef47
D
Dave Bort committed
262dfc002dbb27d654eaeb1bb58dc81dd6193a87
Parent: 08ecd73
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/14/2024, 3:49:27 AM