[SOLVED]Adding tvm4j to a bazel build


#1

I’m working on porting libtvm.so style support on Android to an existing TFLite app that uses the bazel build system. I’m a complete novice here, so does anyone have experience with how to get import ml.dmlc.tvm...(adding tvm4j as a dependency) to work here? Is there some incantation of WORKSPACE and BUILD I need?

Right now I get something like

Failed to fetch Maven dependency: Could not find artifact ml.dmlc.tvm:tvm4j-core:jar:0.0.1-SNAPSHOT in ml_dmlc_tvm_tvm4j_core

This is probably because I am doing something totally wrong in the WORKSPACE file e.g.,

maven_jar(
name="ml_dmlc_tvm_tvm4j_core",
artifact="ml.dmlc.tvm:tvm4j-core:0.0.1-SNAPSHOT",
)

My guess is that it is not trying to query the local maven packages?
CC @yzhliu @PariksheetPinjari909


#2

Did you do make jvminstall? I don’t know bazel but I guess there’s an option for enable local maven repo?


#3

Yes, I have built many versions of the current android deploy demo and make jvminstall has worked for those. Searching for bazel and local maven repo doesn’t seem to turn up anything for me. I think there is an option to specify server in maven_jar, but I am not sure what is a reasonable setting here.


#4

Looks like this obscure issue is in the right direction: