You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/26 01:25:54 UTC

[GitHub] [tvm] areusch commented on a diff in pull request #12178: Build and test TVM under minimal configuration

areusch commented on code in PR #12178:
URL: https://github.com/apache/tvm/pull/12178#discussion_r929444267


##########
tests/scripts/task_cpp_unittest.sh:
##########
@@ -45,20 +45,23 @@ python3 tests/scripts/task_build.py \
     --cmake-target cpptest \
     --build-dir "${BUILD_DIR}"
 
-# crttest requires USE_MICRO to be enabled, which is currently the case
-# with all CI configs
-pushd "${BUILD_DIR}"
-ninja crttest
-popd
+# crttest requires USE_MICRO to be enabled.
+if grep -Fq "set(USE_MICRO ON)" ${BUILD_DIR}/config.cmake; then

Review Comment:
   i really wanted to be able to have you just look this up in CMakeCache.txt, but unfortunately we don't cache these. i wonder if we should be setting this with `set(USE_ABC ___ CACHED)` so we can inspect that. what if we modified [Summary.cmake](https://github.com/apache/tvm/blob/main/cmake/utils/Summary.cmake) to write the options to a file via https://cmake.org/cmake/help/latest/command/file.html#append?



##########
tests/scripts/task_config_build_minimal.sh:
##########
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -euxo pipefail
+
+BUILD_DIR=$1
+mkdir -p "$BUILD_DIR"
+cd "$BUILD_DIR"
+cp ../cmake/config.cmake .
+
+echo set\(USE_SORT ON\) >> config.cmake

Review Comment:
   +1 to this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org