-
Notifications
You must be signed in to change notification settings - Fork 551
Integrate torchgen exception boundary with ExecuTorch #7546
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 2 commits
238d6f0
eacf0db
85f1f22
f375188
b405dbd
b34b10d
63119b2
a400808
d0aeeda
3805417
3e3a3e9
11f2eb0
9fad43d
672b94d
8e042ac
97972bd
f2fb0b1
de1cc23
3ffb5d2
00f6b85
aff01f5
59b5088
99b4a3d
078941b
6339d09
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 |
---|---|---|
@@ -1 +1 @@ | ||
2ea4b56ec872424e486c4fe2d55da061067a2ed3 | ||
f0c50a619c282a01ef1ad33690b7ab5e615d9fef |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,13 +11,14 @@ | |||||
# arguments. | ||||||
function(gen_selected_ops) | ||||||
set(arg_names LIB_NAME OPS_SCHEMA_YAML ROOT_OPS INCLUDE_ALL_OPS) | ||||||
cmake_parse_arguments(GEN "" "" "${arg_names}" ${ARGN}) | ||||||
cmake_parse_arguments(GEN "${options}" "" "${arg_names}" ${ARGN}) | ||||||
|
||||||
message(STATUS "Generating operator lib:") | ||||||
message(STATUS " LIB_NAME: ${GEN_LIB_NAME}") | ||||||
message(STATUS " OPS_SCHEMA_YAML: ${GEN_OPS_SCHEMA_YAML}") | ||||||
message(STATUS " ROOT_OPS: ${GEN_ROOT_OPS}") | ||||||
message(STATUS " INCLUDE_ALL_OPS: ${GEN_INCLUDE_ALL_OPS}") | ||||||
message(STATUS " ADD_EXCEPTION_BOUNDARY: ${GEN_ADD_EXCEPTION_BOUNDARTY}") | ||||||
|
||||||
set(_oplist_yaml | ||||||
${CMAKE_CURRENT_BINARY_DIR}/${GEN_LIB_NAME}/selected_operators.yaml | ||||||
|
@@ -59,13 +60,15 @@ endfunction() | |||||
# Invoked as generate_bindings_for_kernels( LIB_NAME lib_name FUNCTIONS_YAML | ||||||
# functions_yaml CUSTOM_OPS_YAML custom_ops_yaml ) | ||||||
function(generate_bindings_for_kernels) | ||||||
set(options ADD_EXCEPTION_BOUNDARY) | ||||||
set(arg_names LIB_NAME FUNCTIONS_YAML CUSTOM_OPS_YAML) | ||||||
cmake_parse_arguments(GEN "" "${arg_names}" "" ${ARGN}) | ||||||
cmake_parse_arguments(GEN "${options}" "${arg_names}" "" ${ARGN}) | ||||||
|
||||||
message(STATUS "Generating kernel bindings:") | ||||||
message(STATUS " LIB_NAME: ${GEN_LIB_NAME}") | ||||||
message(STATUS " FUNCTIONS_YAML: ${GEN_FUNCTIONS_YAML}") | ||||||
message(STATUS " CUSTOM_OPS_YAML: ${GEN_CUSTOM_OPS_YAML}") | ||||||
message(STATUS " ADD_EXCEPTION_BOUNDARY: ${GEN_ADD_EXCEPTION_BOUNDARY}") | ||||||
|
||||||
# Command to generate selected_operators.yaml from custom_ops.yaml. | ||||||
file(GLOB_RECURSE _codegen_templates "${EXECUTORCH_ROOT}/codegen/templates/*") | ||||||
|
@@ -93,7 +96,10 @@ function(generate_bindings_for_kernels) | |||||
--tags-path=${site-packages-out}/torchgen/packaged/ATen/native/tags.yaml | ||||||
--aten-yaml-path=${site-packages-out}/torchgen/packaged/ATen/native/native_functions.yaml | ||||||
--op-selection-yaml-path=${_oplist_yaml} | ||||||
) | ||||||
) | ||||||
if(GEN_ADD_EXCEPTION_BOUNDARY) | ||||||
set(_gen_command "${_gen_command} --add-exception-boundary") | ||||||
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. I think the set command use semi-colon separator instead of space, i.e. The failure is complaining about a wrong filename https://github.com/pytorch/executorch/actions/runs/12660296601/job/35287265644#step:14:1992
Suggested change
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. strange, I thought I built this locally. Giving it a shot now. 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. this does seem to have improved the situation (thanks!) but the torchgen version still seems to be wrong: https://github.com/pytorch/executorch/actions/runs/12680876952/job/35343491373?pr=7546#step:9:2186 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. @huydhn still seeing at least some wrong-torchgen-version failures:
however, we do have mac successes. looking into the common thread for these failures now. 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. the ARM one is easy: the workflow directly invokes test-llava-runner-linux reruns install_requirements.sh and doesn't pass --use-pt-pinned-commit, same with test-phi-3-mini-runner, test-eval_llama-wikitext-linux, test-eval_llama-mmlu-linux, and test-llama_runner_eager-linux. I will send a PR to fix those. |
||||||
endif() | ||||||
|
||||||
set(_gen_command_sources | ||||||
${_out_dir}/RegisterCodegenUnboxedKernelsEverything.cpp | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.