[PATCH] D104829: Fail gracefully if no inlining model is available to download.

Jacob Hegna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 21:05:06 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG96f15aa5bbb0: Fail gracefully if no inlining model is available to download. (authored by jacobhegna).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104829/new/

https://reviews.llvm.org/D104829

Files:
  llvm/cmake/modules/TensorFlowCompile.cmake


Index: llvm/cmake/modules/TensorFlowCompile.cmake
===================================================================
--- llvm/cmake/modules/TensorFlowCompile.cmake
+++ llvm/cmake/modules/TensorFlowCompile.cmake
@@ -88,6 +88,11 @@
 
 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()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104829.355769.patch
Type: text/x-patch
Size: 840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210701/02045378/attachment.bin>


More information about the llvm-commits mailing list