Skip to content

Commit 28447a3

Browse files
jacob-hegnamemfrob
authored andcommitted
Fail gracefully if no inlining model is available to download.
Differential Revision: https://reviews.llvm.org/D104829
1 parent f362206 commit 28447a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/cmake/modules/TensorFlowCompile.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ endfunction()
8888

8989
function(tf_find_and_compile model default_url default_path generation_config tag_set signature_def_key fname cpp_class)
9090
if ("${model}" STREQUAL "download")
91+
# Crash if the user wants to download a model but a URL is set to "TO_BE_UPDATED"
92+
if ("${LLVM_INLINER_MODEL_CURRENT_URL}" STREQUAL "TO_BE_UPDATED")
93+
message(FATAL_ERROR "LLVM_INLINER_MODEL_PATH was set to 'download' but there is no model url currently specified in cmake - likely, the model interface recently changed, and so there is not a released model available.")
94+
endif()
95+
9196
set(model ${default_url})
9297
endif()
9398

0 commit comments

Comments
 (0)