-
Couldn't load subscription status.
- Fork 700
Add torchao kernels to xcframework #10963
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
Changes from all commits
03b306d
b4dd92b
b6e0518
e0e6e98
f575cbf
9b9aa90
9e913c4
c16c779
c0c26aa
70c6ae6
21bb1c1
82659ec
402a7ed
e1f9b8a
3b11e4c
06c2583
a8f3b35
ed0ccd3
6eebd8d
8f80fde
c146407
e1f0101
5dd6df8
5200d68
276232e
58b24c2
6a00da3
435ffa1
16b8984
3547232
03f584a
eab0f73
935da89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,11 @@ libquantized_kernels.a,\ | |
| libquantized_ops_lib.a,\ | ||
| :" | ||
|
|
||
| FRAMEWORK_KERNELS_TORCHAO="kernels_torchao:\ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before testing xcframework, let's verify your changes work on macOS desktop first. |
||
| libtorchao_ops_executorch.a,\ | ||
| libtorchao_kernels_aarch64.a,\ | ||
| :" | ||
|
|
||
| usage() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shoumikhin can you review these changes to xcframeworks, and comment on any tests that should be run? |
||
| echo "Usage: $0 [OPTIONS]" | ||
| echo "Build frameworks for Apple platforms." | ||
|
|
@@ -137,6 +142,7 @@ usage() { | |
| echo " --mps Only build the Metal Performance Shaders backend." | ||
| echo " --optimized Only build the Optimized kernels." | ||
| echo " --quantized Only build the Quantized kernels." | ||
| echo " --torchao Only build the TorchAO kernels." | ||
| echo " --xnnpack Only build the XNNPACK backend." | ||
| echo | ||
| exit 0 | ||
|
|
@@ -154,6 +160,7 @@ set_cmake_options_override() { | |
| "-DEXECUTORCH_BUILD_MPS=OFF" | ||
| "-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=OFF" | ||
| "-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=OFF" | ||
| "-DEXECUTORCH_BUILD_KERNELS_TORCHAO=OFF" | ||
hinriksnaer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "-DEXECUTORCH_BUILD_XNNPACK=OFF" | ||
| ) | ||
| fi | ||
|
|
@@ -184,6 +191,7 @@ for arg in "$@"; do | |
| --mps) set_cmake_options_override "EXECUTORCH_BUILD_MPS" ;; | ||
| --optimized) set_cmake_options_override "EXECUTORCH_BUILD_KERNELS_OPTIMIZED" ;; | ||
| --quantized) set_cmake_options_override "EXECUTORCH_BUILD_KERNELS_QUANTIZED" ;; | ||
| --torchao) set_cmake_options_override "EXECUTORCH_BUILD_KERNELS_TORCHAO" ;; | ||
| --xnnpack) set_cmake_options_override "EXECUTORCH_BUILD_XNNPACK" ;; | ||
| *) | ||
| echo -e "\033[31m[error] unknown option: ${arg}\033[0m" | ||
|
|
@@ -311,6 +319,7 @@ for mode in "${MODES[@]}"; do | |
| append_framework_flag "EXECUTORCH_BUILD_KERNELS_LLM" "$FRAMEWORK_KERNELS_LLM" "$mode" | ||
| append_framework_flag "EXECUTORCH_BUILD_KERNELS_OPTIMIZED" "$FRAMEWORK_KERNELS_OPTIMIZED" "$mode" | ||
| append_framework_flag "EXECUTORCH_BUILD_KERNELS_QUANTIZED" "$FRAMEWORK_KERNELS_QUANTIZED" "$mode" | ||
| append_framework_flag "EXECUTORCH_BUILD_KERNELS_TORCHAO" "$FRAMEWORK_KERNELS_TORCHAO" "$mode" | ||
|
|
||
| cd "${OUTPUT_DIR}" | ||
| "$SOURCE_ROOT_DIR"/scripts/create_frameworks.sh "${FRAMEWORK_FLAGS[@]}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What adding "${EXECUTORCH_ROOT}/third-party/ao" necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it caused the build process to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the failure?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the bottom of the terminal output