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

Commit a80dd38

Browse files
vvchernovValery Chernov
andauthored
[CI] fix unity build failure related to undefined symbols in tflite (#38)
fix order of libclog.a and libcpuinfo.a Co-authored-by: Valery Chernov <[email protected]>
1 parent eade7df commit a80dd38

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

cmake/modules/contrib/TFLite.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ if(NOT USE_TFLITE STREQUAL "OFF")
3939
endif()
4040
find_library(TFLITE_CONTRIB_LIB libtensorflow-lite.a ${USE_TFLITE})
4141
file(GLOB_RECURSE TFLITE_DEPS "${USE_TFLITE}/*.a")
42+
# the order of the next libs are important for correct build
43+
list(REMOVE_ITEM TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a" "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a")
44+
list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/cpuinfo-build/libcpuinfo.a")
45+
list(APPEND TFLITE_DEPS "${USE_TFLITE}/_deps/clog-build/libclog.a")
4246

4347
list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_CONTRIB_LIB})
4448
list(APPEND TVM_RUNTIME_LINKER_LIBS ${TFLITE_DEPS})

python/tvm/relax/frontend/onnx_frontend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Not all TVM kernels currently support dynamic shapes, please file an issue on
3535
github.com/apache/tvm/issues if you hit an error with dynamic kernels.
3636
"""
37-
import math
37+
# import math
3838
import warnings
3939
from typing import Union, List, Dict, Tuple, Any
4040
import onnx.onnx_ml_pb2

src/topi/einsum.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,15 @@ class EinsumBuilder {
264264
// Ellipsis
265265
auto ellipsis_shape = ellipsis_shape_.value();
266266
for (int i = 0; i < static_cast<int>(ellipsis_shape.size()); ++i) {
267-
reduction_axes->push_back(
268-
IterVar(Range(0, ellipsis_shape[i]), Var("k", DataType::Int(64)), IterVarType::kCommReduce));
267+
reduction_axes->push_back(IterVar(Range(0, ellipsis_shape[i]),
268+
Var("k", DataType::Int(64)), IterVarType::kCommReduce));
269269
ellipsis_indices->push_back(reduction_axes->back()->var);
270270
}
271271
} else {
272272
// Normal label
273273
reduction_axes->push_back(IterVar(Range(0, label_to_extent_[label]),
274-
Var(std::string(1, label), DataType::Int(64)), IterVarType::kCommReduce));
274+
Var(std::string(1, label), DataType::Int(64)),
275+
IterVarType::kCommReduce));
275276
label_to_index->emplace(label, reduction_axes->back()->var);
276277
}
277278
}

0 commit comments

Comments
 (0)