Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

[CI] fix unity build failure related to undefined symbols in tflite #38

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions cmake/modules/contrib/TFLite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ if(NOT USE_TFLITE STREQUAL "OFF")
endif()
find_library(TFLITE_CONTRIB_LIB libtensorflow-lite.a ${USE_TFLITE})
file(GLOB_RECURSE TFLITE_DEPS "${USE_TFLITE}/*.a")
# the order of the next libs are important for correct build
list(REMOVE_ITEM TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a" "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a")
list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a")
list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a")

list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_CONTRIB_LIB})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_DEPS})
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relax/frontend/onnx_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Not all TVM kernels currently support dynamic shapes, please file an issue on
github.com/apache/tvm/issues if you hit an error with dynamic kernels.
"""
import math
# import math
import warnings
from typing import Union, List, Dict, Tuple, Any
import onnx.onnx_ml_pb2
Expand Down
7 changes: 4 additions & 3 deletions src/topi/einsum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,15 @@ class EinsumBuilder {
// Ellipsis
auto ellipsis_shape = ellipsis_shape_.value();
for (int i = 0; i < static_cast<int>(ellipsis_shape.size()); ++i) {
reduction_axes->push_back(
IterVar(Range(0, ellipsis_shape[i]), Var("k", DataType::Int(64)), IterVarType::kCommReduce));
reduction_axes->push_back(IterVar(Range(0, ellipsis_shape[i]),
Var("k", DataType::Int(64)), IterVarType::kCommReduce));
ellipsis_indices->push_back(reduction_axes->back()->var);
}
} else {
// Normal label
reduction_axes->push_back(IterVar(Range(0, label_to_extent_[label]),
Var(std::string(1, label), DataType::Int(64)), IterVarType::kCommReduce));
Var(std::string(1, label), DataType::Int(64)),
IterVarType::kCommReduce));
label_to_index->emplace(label, reduction_axes->back()->var);
}
}
Expand Down