Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ else(MSVC)
set(TVM_VISIBILITY_FLAG "-fvisibility=hidden")
endif(HIDE_PRIVATE_SYMBOLS)
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(CMAKE_CXX_FLAGS "-faligned-new ${CMAKE_CXX_FLAGS}")
endif()
Expand Down Expand Up @@ -503,13 +503,13 @@ include(cmake/modules/RustExt.cmake)

include(CheckCXXCompilerFlag)
if(NOT MSVC)
check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14)
set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_STANDARD 14)
check_cxx_compiler_flag("-std=c++17" SUPPORT_CXX17)
set(CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_STANDARD 17)
else()
check_cxx_compiler_flag("/std:c++14" SUPPORT_CXX14)
set(CMAKE_CXX_FLAGS "/std:c++14 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_STANDARD 14)
check_cxx_compiler_flag("/std:c++17" SUPPORT_CXX17)
set(CMAKE_CXX_FLAGS "/std:c++17 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_STANDARD 17)
endif()

set(LIBINFO_FILE ${CMAKE_CURRENT_LIST_DIR}/src/support/libinfo.cc)
Expand Down
2 changes: 1 addition & 1 deletion apps/android_camera/app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include $(config)
APP_ABI ?= all
APP_STL := c++_shared

APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++14 -Oz -frtti
APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++17 -Oz -frtti
ifeq ($(USE_OPENCL), 1)
APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
endif
Expand Down
2 changes: 1 addition & 1 deletion apps/android_deploy/app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include $(config)

APP_STL := c++_static

APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++14 -Oz -frtti
APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++17 -Oz -frtti
ifeq ($(USE_OPENCL), 1)
APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
endif
2 changes: 1 addition & 1 deletion apps/android_rpc/app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include $(config)
APP_ABI ?= armeabi-v7a arm64-v8a x86 x86_64 mips
APP_STL := c++_shared

APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++14 -Oz -frtti
APP_CPPFLAGS += -DTVM_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++17 -Oz -frtti
ifeq ($(USE_OPENCL), 1)
APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
endif
Expand Down
2 changes: 1 addition & 1 deletion apps/bundle_deploy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ENABLE_TVM_PLATFORM_ABORT_BACKTRACE ?= 1

DMLC_CORE=${TVM_ROOT}/3rdparty/dmlc-core
PKG_COMPILE_OPTS = -g -Wall -O2 -fPIC
PKG_CXXFLAGS = ${PKG_COMPILE_OPTS} -std=c++14 \
PKG_CXXFLAGS = ${PKG_COMPILE_OPTS} -std=c++17 \
-I${TVM_ROOT}/include \
-I${DMLC_CORE}/include \
-I${TVM_ROOT}/3rdparty/dlpack/include \
Expand Down
2 changes: 1 addition & 1 deletion apps/dso_plugin_module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

TVM_ROOT=$(shell cd ../..; pwd)
PKG_CFLAGS = -std=c++14 -O2 -fPIC\
PKG_CFLAGS = -std=c++17 -O2 -fPIC\
-I${TVM_ROOT}/include\
-I${TVM_ROOT}/3rdparty/dmlc-core/include\
-I${TVM_ROOT}/3rdparty/dlpack/include\
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Minimum Makefile for the extension package
TVM_ROOT=$(shell cd ../..; pwd)
PKG_CFLAGS = -std=c++14 -O2 -fPIC\
PKG_CFLAGS = -std=c++17 -O2 -fPIC\
-I${TVM_ROOT}/include\
-I${TVM_ROOT}/3rdparty/dmlc-core/include\
-I${TVM_ROOT}/3rdparty/dlpack/include\
Expand Down
2 changes: 1 addition & 1 deletion apps/howto_deploy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
TVM_ROOT=$(shell cd ../..; pwd)
DMLC_CORE=${TVM_ROOT}/3rdparty/dmlc-core

PKG_CFLAGS = -std=c++14 -O2 -fPIC\
PKG_CFLAGS = -std=c++17 -O2 -fPIC\
-I${TVM_ROOT}/include\
-I${DMLC_CORE}/include\
-I${TVM_ROOT}/3rdparty/dlpack/include\
Expand Down
2 changes: 1 addition & 1 deletion apps/howto_deploy/tvm_runtime_pack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* include in your project.
*
* - Copy this file into your project which depends on tvm runtime.
* - Compile with -std=c++14
* - Compile with -std=c++17
* - Add the following include path
* - /path/to/tvm/include/
* - /path/to/tvm/3rdparty/dmlc-core/include/
Expand Down
2 changes: 1 addition & 1 deletion apps/rocm_rpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ROCM_PATH=/opt/rocm
TVM_ROOT=$(shell cd ../..; pwd)
DMLC_CORE=${TVM_ROOT}/3rdparty/dmlc-core

PKG_CFLAGS = -std=c++14 -O2 -fPIC\
PKG_CFLAGS = -std=c++17 -O2 -fPIC\
-I${TVM_ROOT}/include\
-I${DMLC_CORE}/include\
-I${TVM_ROOT}/3rdparty/dlpack/include\
Expand Down
2 changes: 1 addition & 1 deletion apps/tf_tvmdsoop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
cmake_minimum_required(VERSION 3.2)
project(tf_tvmdsoop C CXX)

set(TFTVM_COMPILE_FLAGS -std=c++14)
set(TFTVM_COMPILE_FLAGS -std=c++17)
set(BUILD_TVMDSOOP_ONLY ON)
set(CMAKE_CURRENT_SOURCE_DIR ${TVM_ROOT})
set(CMAKE_CURRENT_BINARY_DIR ${TVM_ROOT}/build)
Expand Down
2 changes: 1 addition & 1 deletion golang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NATIVE_SRC = tvm_runtime_pack.cc
GOPATH=$(CURDIR)/gopath
GOPATHDIR=${GOPATH}/src/${TARGET}/
CGO_CPPFLAGS="-I. -I${TVM_BASE}/ -I${TVM_BASE}/3rdparty/dmlc-core/include -I${TVM_BASE}/include -I${TVM_BASE}/3rdparty/dlpack/include/"
CGO_CXXFLAGS="-std=c++14 -DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h> -DTVM_USE_LIBBACKTRACE=0"
CGO_CXXFLAGS="-std=c++17 -DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h> -DTVM_USE_LIBBACKTRACE=0"
CGO_CFLAGS="-I${TVM_BASE}"
CGO_LDFLAGS="-ldl -lm"

Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def config_cython():
subdir = "_cy2"
ret = []
path = "tvm/_ffi/_cython"
extra_compile_args = ["-std=c++14", "-DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>"]
extra_compile_args = ["-std=c++17", "-DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>"]
if os.name == "nt":
library_dirs = ["tvm", "../build/Release", "../build"]
libraries = ["tvm"]
Expand Down