diff --git a/Jenkinsfile b/Jenkinsfile index 608f9ca8b8c2c..f4827856279a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,7 +98,6 @@ stage('Build') { echo set\\(USE_GRAPH_RUNTIME ON\\) >> config.cmake echo set\\(USE_STACKVM_RUNTIME ON\\) >> config.cmake echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(USE_ANTLR ON\\) >> config.cmake echo set\\(USE_BLAS openblas\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake @@ -134,7 +133,6 @@ stage('Build') { echo set\\(USE_LLVM llvm-config-4.0\\) >> config.cmake echo set\\(USE_NNPACK ON\\) >> config.cmake echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake - echo set\\(USE_ANTLR ON\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake """ diff --git a/cmake/modules/ANTLR.cmake b/cmake/modules/ANTLR.cmake index aede0098b7fb6..82d866c0de01d 100644 --- a/cmake/modules/ANTLR.cmake +++ b/cmake/modules/ANTLR.cmake @@ -3,7 +3,7 @@ if(USE_ANTLR) /usr/local/lib/antlr-*-complete.jar /usr/local/Cellar/*antlr-*-complete.jar) - if(DEFINED ANTLR4) +if(ANTLR4) # Get the first element of the list of antlr jars. # Sort and reverse the list so the item selected is the highest # version in lib or else in Cellar if no lib installation exists. diff --git a/nnvm/src/top/nn/nn.cc b/nnvm/src/top/nn/nn.cc index 222053a78b120..eba8ec5ba2d93 100644 --- a/nnvm/src/top/nn/nn.cc +++ b/nnvm/src/top/nn/nn.cc @@ -194,11 +194,12 @@ inline bool BatchNormInferShape(const nnvm::NodeAttrs& attrs, return true; } -inline bool BatchNormCorrectLayout(const NodeAttrs& attrs, +inline bool BatchNormCorrectLayout(const NodeAttrs& attrs_const, std::vector* ishapes, std::vector *in_layouts, const std::vector *last_in_layouts, std::vector *out_layouts) { + NodeAttrs& attrs = const_cast(attrs_const); const BatchNormParam& param = nnvm::get(attrs.parsed); CHECK_EQ(in_layouts->size(), 5U); CHECK_EQ(last_in_layouts->size(), 5U); @@ -593,11 +594,12 @@ inline bool PadInferShape(const nnvm::NodeAttrs& attrs, return true; } -inline bool PadCorrectLayout(const NodeAttrs& attrs, +inline bool PadCorrectLayout(const NodeAttrs& attrs_const, std::vector* ishapes, std::vector* ilayouts, const std::vector* last_ilayouts, std::vector* olayouts) { + NodeAttrs& attrs = const_cast(attrs_const); const PadParam& param = nnvm::get(attrs.parsed); const auto& last_layout = last_ilayouts->at(0); Layout layout = ilayouts->at(0);