Skip to content

Commit

Permalink
Fix build failure
Browse files Browse the repository at this point in the history
Fix lint

Fix empty list

more fix

try

Disable ANTLR
  • Loading branch information
wweic committed Mar 5, 2019
1 parent a7b1b83 commit 4534d91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/ANTLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions nnvm/src/top/nn/nn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<TShape>* ishapes,
std::vector<Layout> *in_layouts,
const std::vector<Layout> *last_in_layouts,
std::vector<Layout> *out_layouts) {
NodeAttrs& attrs = const_cast<NodeAttrs&>(attrs_const);
const BatchNormParam& param = nnvm::get<BatchNormParam>(attrs.parsed);
CHECK_EQ(in_layouts->size(), 5U);
CHECK_EQ(last_in_layouts->size(), 5U);
Expand Down Expand Up @@ -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<TShape>* ishapes,
std::vector<Layout>* ilayouts,
const std::vector<Layout>* last_ilayouts,
std::vector<Layout>* olayouts) {
NodeAttrs& attrs = const_cast<NodeAttrs&>(attrs_const);
const PadParam& param = nnvm::get<PadParam>(attrs.parsed);
const auto& last_layout = last_ilayouts->at(0);
Layout layout = ilayouts->at(0);
Expand Down

0 comments on commit 4534d91

Please sign in to comment.