[llvm] 96f15aa - Fail gracefully if no inlining model is available to download.
Jacob Hegna via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 21:04:56 PDT 2021
Author: Jacob Hegna
Date: 2021-07-01T04:04:11Z
New Revision: 96f15aa5bbb0c6b2a56fa5fcbbd58f5b69fe4076
URL: https://github.com/llvm/llvm-project/commit/96f15aa5bbb0c6b2a56fa5fcbbd58f5b69fe4076
DIFF: https://github.com/llvm/llvm-project/commit/96f15aa5bbb0c6b2a56fa5fcbbd58f5b69fe4076.diff
LOG: Fail gracefully if no inlining model is available to download.
Differential Revision: https://reviews.llvm.org/D104829
Added:
Modified:
llvm/cmake/modules/TensorFlowCompile.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/TensorFlowCompile.cmake b/llvm/cmake/modules/TensorFlowCompile.cmake
index 27b9d33a33fe5..6f77174982f22 100644
--- a/llvm/cmake/modules/TensorFlowCompile.cmake
+++ b/llvm/cmake/modules/TensorFlowCompile.cmake
@@ -88,6 +88,11 @@ endfunction()
function(tf_find_and_compile model default_url default_path generation_config tag_set signature_def_key fname cpp_class)
if ("${model}" STREQUAL "download")
+ # Crash if the user wants to download a model but a URL is set to "TO_BE_UPDATED"
+ if ("${LLVM_INLINER_MODEL_CURRENT_URL}" STREQUAL "TO_BE_UPDATED")
+ 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.")
+ endif()
+
set(model ${default_url})
endif()
More information about the llvm-commits
mailing list