iml130 / mlir-emitc Goto Github PK
View Code? Open in Web Editor NEWConversions to MLIR EmitC
License: Apache License 2.0
Conversions to MLIR EmitC
License: Apache License 2.0
There is currently no support for tosa.argmax
. Support needs to be added to the reference implementation (reference-implementation/include/emitc/tosa.h) and a conversion pattern needs to added.
I am trying to convert the following tf model using translate_model.py but it fails with the following error:
./tmp2.mlir:4:3: error: is not immutable, try running tf-saved-model-optimize-global-tensors to prove tensors are immutable
"tf_saved_model.global_tensor"() {is_mutable, sym_name = "__sm_node5__m.conv2d.kernel", tf_saved_model.exported_names = ["m.conv2d.kernel", "m.conv2d.variables.0", "m.conv2d.keras_api.variables.0", "m.conv2d.trainable_variables.0", "m.conv2d.keras_api.trainable_variables.0"],
This comes up when tf_opt is used and tf-saved-model-optimize-global-tensors
flag is encountered.
The following is the model for your reference:
class Model(tf.keras.Model):
def __init__(self):
super(Model, self).__init__()
self.conv2d = tf.keras.layers.Conv2D(32, (3, 3), (1, 1), data_format='channels_last', use_bias=False)
def call(self, input):
x = self.conv2d(input)
x = tf.nn.relu(x)
y = self.conv2d(input)
y = tf.nn.relu(y)
return x + y
I also tried converting an mnist model but it fails at translation itself (tf-mlir-translate):
2020-09-24 18:27:21.207388: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0
2020-09-24 18:27:21.260534: I tensorflow/cc/saved_model/bundle_v2.cc:32] Reading SavedModel from: ./tf_mnist/tf_saved_model
2020-09-24 18:27:21.261778: I tensorflow/cc/saved_model/bundle_v2.cc:55] Reading SavedModel debug info (if present) from: ./tf_mnist/tf_saved_model
2020-09-24 18:27:21.300066: E tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc:163] SavedModel import failed: Invalid argument: Exported function with exported name(s) 'm.flatten.__call__', 'm.flatten.keras_api.__call__' with multiple concrete functions. Add @tf.function(input_signature=[...]) on this function, or use a narrower list of exported names that excludes this function.
It appears as if the legalization passes can't be composed to handle an input file consisting of TOSA and MHLO ops to EmitC.
Hi,
I tried to build an run emit C, so I followed the steps in README.
I used [build_tools/build_mlir.sh](https://github.com/iml130/mlir-emitc/blob/main/build_tools/build_mlir.sh)
to build and install LLVM and MLIR and set BUILD_DIR and PREFIX.
Here is my setting about BUILD_DIR and PREFIX.
setenv BUILD_DIR "/users/student/mr108/cwlu19/ic8/mlir-emitc/llvm/llvm-build"
setenv PREFIX "/users/student/mr108/cwlu19/ic8/mlir-emitc/llvm-install"
After I run the command cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. -DMLIR_DIR=$PREFIX/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=$BUILD_DIR/bin/llvm-lit
, I met this error.
CMake Error at llvm-install/lib/cmake/llvm/AddLLVM.cmake:512 (add_dependencies):
The dependency target "MLIRArithmetic" of target "obj.GmlStTilingInterface"
does not exist.
Call Stack (most recent call first):
llvm-install/lib/cmake/mlir/AddMLIR.cmake:130 (llvm_add_library)
third_party/mlir-hlo/lib/Dialect/gml_st/transforms/CMakeLists.txt:20 (add_mlir_library)
CMake Error at llvm-install/lib/cmake/llvm/AddLLVM.cmake:512 (add_dependencies):
The dependency target "MLIRArithmetic" of target "obj.MhloToLhloConversion"
does not exist.
Call Stack (most recent call first):
llvm-install/lib/cmake/mlir/AddMLIR.cmake:130 (llvm_add_library)
third_party/mlir-hlo/lib/Dialect/mhlo/transforms/CMakeLists.txt:96 (add_mlir_library)
CMake Error at llvm-install/lib/cmake/llvm/AddLLVM.cmake:512 (add_dependencies):
The dependency target "MLIRArithmeticTransforms" of target
"obj.MhloToLhloConversion" does not exist.
Call Stack (most recent call first):
llvm-install/lib/cmake/mlir/AddMLIR.cmake:130 (llvm_add_library)
third_party/mlir-hlo/lib/Dialect/mhlo/transforms/CMakeLists.txt:96 (add_mlir_library)
CMake Error at llvm-install/lib/cmake/llvm/AddLLVM.cmake:512 (add_dependencies):
The dependency target "MLIRArithmetic" of target "obj.MLIRMhloUtils" does
not exist.
Call Stack (most recent call first):
llvm-install/lib/cmake/mlir/AddMLIR.cmake:130 (llvm_add_library)
third_party/mlir-hlo/lib/utils/CMakeLists.txt:17 (add_mlir_library)
CMake Error at llvm-install/lib/cmake/llvm/AddLLVM.cmake:939 (add_dependencies):
The dependency target "MLIRAffineAnalysis" of target "emitc-opt" does not
exist.
Call Stack (most recent call first):
tools/emitc-opt/CMakeLists.txt:46 (add_llvm_executable)
Did I misunderstand anything?
Thanks!
Currently the converter doesn't support MHLO reduce with variadic reduce, so computations like
%752:2 = mhlo.reduce(%748 init: %750), (%749 init: %751) across dimensions = [1] : (tensor<1x2xf32>, tensor<1x2xi32>, tensor<f32>, tensor<i32>) -> (tensor<1xf32>, tensor<1xi32>)
reducer(%arg35: tensor<f32>, %arg37: tensor<f32>) (%arg36: tensor<i32>, %arg38: tensor<i32>) {
%764 = "mhlo.compare"(%arg35, %arg37) {comparison_direction = "GE"} : (tensor<f32>, tensor<f32>) -> tensor<i1>
%765 = "mhlo.select"(%764, %arg35, %arg37) : (tensor<i1>, tensor<f32>, tensor<f32>) -> tensor<f32>
%766 = "mhlo.compare"(%arg35, %arg37) {comparison_direction = "EQ"} : (tensor<f32>, tensor<f32>) -> tensor<i1>
%767 = mhlo.minimum %arg36, %arg38 : tensor<i32>
%768 = "mhlo.select"(%764, %arg36, %arg38) : (tensor<i1>, tensor<i32>, tensor<i32>) -> tensor<i32>
%769 = "mhlo.select"(%766, %767, %768) : (tensor<i1>, tensor<i32>, tensor<i32>) -> tensor<i32>
"mhlo.return"(%765, %769) : (tensor<f32>, tensor<i32>) -> ()
}
doesn't convert.
Hi,
Is it possible to include one or more examples of generated C/C++ from MLIR in the repository or have a link in the README for examples on this?
I am interested in particular with complicated expression trees. For example, how the Pythagoras theorem formula would look. I understand that MLIR has a 3 address operation constraint. How something like this would come out? In multiple lines or a single line of C++ code? It would be nice to see it like the latter, because otherwise it could look like assembly language in C++.
Sorry for writing here, I did not find another way of communicating this.
Thanks,
Ivan
As previously filled in #41, we need to extend mhlo::concaternate
for one of our internally used models. According to @OliverScherf the MLIR snippet
Tensor4D<float, 1, 59, 87, 64> v101 = mhlo::max<>(v100, v74);
Tensor4D<float, 1, 59, 87, 64> v105 = mhlo::max<>(v104, v74);
Tensor4D<float, 1, 59, 87, 128> v106 = mhlo::concatenate<3, Tensor4D<float, 1, 59, 87, 128>>(v101, v105);
results in the error message below:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 59, 87, 128>; Src1 = Tensor<float, 1, 59, 87, 64>; Src = {Tensor<float, 1, 59, 87, 64>}]’:
model_generated.h:123:104: required from here
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:458:9: error: no type named ‘type’ in ‘struct concat<3, float, Tensor<float, 1, 59, 87, 64> >’
458 | using Rest = typename concat<Dimension, ET_Src, Src...>::type;
| ^~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 29, 43, 256>; Src1 = Tensor<float, 1, 29, 43, 128>; Src = {Tensor<float, 1, 29, 43, 128>}]’:
model_generated.h:151:104: required from here
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:458:9: error: no type named ‘type’ in ‘struct concat<3, float, Tensor<float, 1, 29, 43, 128> >’
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 14, 21, 384>; Src1 = Tensor<float, 1, 14, 21, 192>; Src = {Tensor<float, 1, 14, 21, 192>}]’:
model_generated.h:179:104: required from here
When Building and Linking the MLIREmitCAllTests target in Debug mode the following linker errors occur:
build] [8/8 100% :: 3.835] Linking CXX executable unittests/MLIREmitCAllTests
[build] FAILED: unittests/MLIREmitCAllTests
[build] : && /bin/clang++-10 -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_mhlo.cpp.o unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_std.cpp.o unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o -o unittests/MLIREmitCAllTests /home/oliver/git/install-mlir/lib/libLLVMSupport.a /home/oliver/git/install-mlir/lib/libLLVMSupport.a -lpthread lib/libgtest_maind.a lib/libgtestd.a -lpthread -lrt -ldl -lm /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libtinfo.so /home/oliver/git/install-mlir/lib/libLLVMDemangle.a -lpthread && :
[build] /bin/ld: unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o: in function `(anonymous namespace)::tensor_meta_is_tensor_0d_Test::TestBody()':
[build] /home/oliver/git/mlir-emitc/build/../unittests/emitc_tensor.cpp:358: undefined reference to `is_tensor_of_dim<0ul, Tensor<unsigned short>, void>::value'
[build] /bin/ld: unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o: in function `(anonymous namespace)::tensor_meta_is_tensor_1d_Test::TestBody()':
[build] /home/oliver/git/mlir-emitc/build/../unittests/emitc_tensor.cpp:377: undefined reference to `is_tensor_of_dim<1ul, Tensor<signed char, 12ul>, void>::value'
[build] /bin/ld: unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o: in function `(anonymous namespace)::tensor_meta_is_tensor_2d_Test::TestBody()':
[build] /home/oliver/git/mlir-emitc/build/../unittests/emitc_tensor.cpp:396: undefined reference to `is_tensor_of_dim<2ul, Tensor<double, 3ul, 7ul>, void>::value'
[build] /bin/ld: unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o: in function `(anonymous namespace)::tensor_meta_is_tensor_3d_Test::TestBody()':
[build] /home/oliver/git/mlir-emitc/build/../unittests/emitc_tensor.cpp:415: undefined reference to `is_tensor_of_dim<3ul, Tensor<float, 1ul, 4ul, 6ul>, void>::value'
[build] /bin/ld: unittests/CMakeFiles/MLIREmitCAllTests.dir/emitc_tensor.cpp.o: in function `(anonymous namespace)::tensor_meta_is_tensor_4d_Test::TestBody()':
[build] /home/oliver/git/mlir-emitc/build/../unittests/emitc_tensor.cpp:434: undefined reference to `is_tensor_of_dim<4ul, Tensor<unsigned char, 2ul, 1ul, 1ul, 9ul>, void>::value'
MLIR emitC Commit: d5a5f63a4abb96ef754531bac9a84180a2c04648
(cgo
Branch)
LLVM Commit: d4e889f1f5723105dbab12b749503d2462eb1755
LLVM Build Type Release
When I build MLIREmitCAllTests in Release mode, everything compiles and links correctly.
With #405, the TOSA spec changed the type of the shift argument from i32
to i8
. The reference implementation still expects an int32_t
whereas an int8_t
is passed in the generated code. Consequently, the type in the reference implementation should be refactored from int32_t
to int8_t
.
The readme refers to build_tools/build.sh
this file does not exists. Instead build_mlir.sh
exists. It looks to me as if the readme should be updated to reflect this name. Or is a file missing?
For a current use-case I need two missing operations in emitC MHLO:
model_generated.h:251:114: error: no matching function for call to ‘slice<Tensor3D<float, 1, 882, 1> >(Tensor3D<float, 1, 882, 6>&, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>)’
251 | Tensor3D<float, 1, 882, 1> v234 = mhlo::slice<Tensor3D<float, 1, 882, 1>>(v233, {0, 0, 5}, {1, 882, 6}, {1, 1, 1});
| ^
In file included from model_generated.h:3,
from test.cpp:2:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:498:6: note: candidate: ‘template<class Dest, class Src, typename std::enable_if<is_tensor_of_dim<1, Src, void>::value, bool>::type <anonymous> > Dest mhlo::slice(Src, Tensor1D<long int, 1>, Tensor1D<long int, 1>, Tensor1D<long int, 1>)’
498 | Dest slice(Src x, Tensor1D<int64_t, 1> start_indices,
| ^~~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:498:6: note: template argument deduction/substitution failed:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:497:64: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
497 | template <typename Dest, typename Src, IsTensorOfDim<1, Src> = true>
| ^~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:512:6: note: candidate: ‘template<class Dest, class Src, typename std::enable_if<is_tensor_of_dim<2, Src, void>::value, bool>::type <anonymous> > Dest mhlo::slice(Src, Tensor1D<long int, 2>, Tensor1D<long int, 2>, Tensor1D<long int, 2>)’
512 | Dest slice(Src x, Tensor1D<int64_t, 2> start_indices,
| ^~~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:512:6: note: template argument deduction/substitution failed:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:511:64: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
511 | template <typename Dest, typename Src, IsTensorOfDim<2, Src> = true>
| ^~~~
Code that causes the issue:
Tensor4D<float, 1, 59, 87, 64> v101 = mhlo::max<>(v100, v74);
Tensor4D<float, 1, 59, 87, 64> v105 = mhlo::max<>(v104, v74);
Tensor4D<float, 1, 59, 87, 128> v106 = mhlo::concatenate<3, Tensor4D<float, 1, 59, 87, 128>>(v101, v105);
Error message:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 59, 87, 128>; Src1 = Tensor<float, 1, 59, 87, 64>; Src = {Tensor<float, 1, 59, 87, 64>}]’:
model_generated.h:123:104: required from here
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:458:9: error: no type named ‘type’ in ‘struct concat<3, float, Tensor<float, 1, 59, 87, 64> >’
458 | using Rest = typename concat<Dimension, ET_Src, Src...>::type;
| ^~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 29, 43, 256>; Src1 = Tensor<float, 1, 29, 43, 128>; Src = {Tensor<float, 1, 29, 43, 128>}]’:
model_generated.h:151:104: required from here
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:458:9: error: no type named ‘type’ in ‘struct concat<3, float, Tensor<float, 1, 29, 43, 128> >’
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h: In instantiation of ‘Dest mhlo::concatenate(Src1, Src ...) [with long int Dimension = 3; Dest = Tensor<float, 1, 14, 21, 384>; Src1 = Tensor<float, 1, 14, 21, 192>; Src = {Tensor<float, 1, 14, 21, 192>}]’:
model_generated.h:179:104: required from here
Hi there,
I noticed there is no support for quantization in the tosa dialect. I'm wondering if that's on the roadmap at all.
As previously filled in #41, we need to extend mhlo::slice
for Tensor3D
:
model_generated.h:251:114: error: no matching function for call to ‘slice<Tensor3D<float, 1, 882, 1> >(Tensor3D<float, 1, 882, 6>&, <brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>)’
251 | Tensor3D<float, 1, 882, 1> v234 = mhlo::slice<Tensor3D<float, 1, 882, 1>>(v233, {0, 0, 5}, {1, 882, 6}, {1, 1, 1});
| ^
In file included from model_generated.h:3,
from test.cpp:2:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:498:6: note: candidate: ‘template<class Dest, class Src, typename std::enable_if<is_tensor_of_dim<1, Src, void>::value, bool>::type <anonymous> > Dest mhlo::slice(Src, Tensor1D<long int, 1>, Tensor1D<long int, 1>, Tensor1D<long int, 1>)’
498 | Dest slice(Src x, Tensor1D<int64_t, 1> start_indices,
| ^~~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:498:6: note: template argument deduction/substitution failed:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:497:64: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
497 | template <typename Dest, typename Src, IsTensorOfDim<1, Src> = true>
| ^~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:512:6: note: candidate: ‘template<class Dest, class Src, typename std::enable_if<is_tensor_of_dim<2, Src, void>::value, bool>::type <anonymous> > Dest mhlo::slice(Src, Tensor1D<long int, 2>, Tensor1D<long int, 2>, Tensor1D<long int, 2>)’
512 | Dest slice(Src x, Tensor1D<int64_t, 2> start_indices,
| ^~~~~
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:512:6: note: template argument deduction/substitution failed:
/home/oliver/git/mlir-emitc/include/emitc/emitc_mhlo.h:511:64: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
511 | template <typename Dest, typename Src, IsTensorOfDim<2, Src> = true>
| ^~~~
Replace all uses of i64ElementsAttr(int64_t, size_t, MLIRContext*)
and getI64ElementsAttr(const ArrayRef<long>, MLIRContext *)
with rewriter.getDenseI64ArrayAttr(ArrayRef<int64_t>)
.
Hi,
Thanks for reply of last issue.
I tried to use e2e_test.sh to generate model in EmitC dialect.
Here is my command.
./e2e_test_tosa.sh saved_model/my_model/ ../reference-implementation/include/ ../build/bin/ clang 32 0 /workspace/mlir-emitc/scripts/test_e2e/
Here is the error message I got.
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_mlir.py", line 84, in experimental_run_pass_pipeline
mlir_txt.encode('utf-8'), pass_pipeline.encode('utf-8'), show_debug_info)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid pass_pipeline: MLIR Textual PassPipeline Parser:1:105: error: 'tf-device-decompose-resource-ops' does not refer to a registered pass or pass pipeline
symbol-dce,tf-standard-pipeline,builtin.func(tf-device-index-selector),inline,canonicalize,builtin.func(tf-device-decompose-resource-ops),builtin.func(tf-functional-control-flow-to-cfg),inline,symbol-dce,canonicalize,tf-saved-model-optimize-global-tensors,tf-saved-model-freeze-global-tensors
Did I misunderstand anything?
I also tried to use savedmodel_to_tf_dialect.py and tf_to_tosa_dialect.py to achieve the goal.
When I ran tf_to_tosa_dialect.py, I got the similar error message.
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_mlir.py", line 84, in experimental_run_pass_pipeline
mlir_txt.encode('utf-8'), pass_pipeline.encode('utf-8'), show_debug_info)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid pass_pipeline: MLIR Textual PassPipeline Parser:1:100: error: 'tosa-fuse-bias-tf' does not refer to a registered pass or pass pipeline
inline,canonicalize,cse,builtin.func(affine-loop-fusion),builtin.func(affine-scalrep),builtin.func(tosa-fuse-bias-tf),builtin.func(tosa-legalize-tf),builtin.func(tosa-infer-shapes),builtin.func(tosa-make-broadcastable),inline,symbol-dce
Thanks for helping a lot!
As part of #389, MLIR gets upgraded to a version in which the types the attributes of some TOSA operations where changes. Instead of i64
, the arguments are now of type i32
. This matches the latest TOSA standard. Our reference implementation does not yet reflects this and still expects arguments of type int64_t
. The implementation for the following ops should be refactored if necessary:
The following operations are missing / need to be updated to support inference of some popular CNNs. (Based on models from tf.keras.Applications
)
MobileNet(V2)
batch_norm_inference
clamp
pad
reduce
convolution (depthwise)
ResNet50
batch_norm_inference
pad
reduce
reduce_window
select allows for scalar predicate support while reference implementation does not.
With #392, the TOSA spec changed the type of the shift argument from i32
to i8
, as evident in the tests (see diff). The reference implementation however still expects an int32_t
whereas the generated code passes an int8_t
. Thus, the type in the reference implementation could be changed from int32_t
to int8_t
.
This test was disabled in #343 because of type changes in the attributes.
We can reuse code from the window method of the Tensor class.
Hi,
There are Mobilenetv2 files in MLIR, but these files are not manual.
I wonder that where could I find the original files to generate these MLIR files.
Thanks!
I'm trying to build the package off cgo branch and I encountered the following error:
CMake Error at third_party/googletest/googletest/cmake/internal_utils.cmake:150 (add_library):
add_library cannot create target "gtest" because an imported target with
the same name already exists.
Call Stack (most recent call first):
third_party/googletest/googletest/cmake/internal_utils.cmake:206 (cxx_library_with_type)
third_party/googletest/googletest/CMakeLists.txt:128 (cxx_library)
CMake Error at third_party/googletest/googletest/cmake/internal_utils.cmake:150 (add_library):
add_library cannot create target "gtest_main" because an imported target
with the same name already exists.
Call Stack (most recent call first):
third_party/googletest/googletest/cmake/internal_utils.cmake:206 (cxx_library_with_type)
third_party/googletest/googletest/CMakeLists.txt:130 (cxx_library)
CMake Error at third_party/googletest/googletest/CMakeLists.txt:143 (target_link_libraries):
Cannot specify link libraries for target "gtest_main" which is not built by
this project.
Any help would be appreciated, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.