You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and compiled the tensoflow android demo application with -DEIGEN_USE_BLAS support and have linked the libopenblas.a to EIGEN by placing the OpenBLAS headers and static library in eigen_archive along with BUILD file. The BUILD File of OpenBLAS is as follows:
The BUILD file of EIGEN has been appended to include and link the openblas library as follows:
cc_library(
name = "eigen",
hdrs = EIGEN_MPL2_HEADER_FILES,
defines = [
# This define (mostly) guarantees we don't link any problematic
# code. We use it, but we do not rely on it, as evidenced above.
"EIGEN_MPL2_ONLY",
],
includes = ["."],
copts = ["-IOpenBLAS/include"],
deps = ["//OpenBLAS:openblas"],
visibility = ["//visibility:public"],
)
The build is given as follows:
bazel build --copt=-DEIGEN_USE_BLAS --fat_apk_cpu=arm64-v8a //tensorflow/examples/android:tensorflow_demo --verbose_failures
The Build is completed successfully and im able to run the apks installed on the target. But the print statements which i have put in OpenBLAS and Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h using android logging LOGI or LOGD doesnt get displayed in logcat of the device.
The Build fails if i dont link the openblas library in EIGEN BUILD file and use -DEIGEN_USE_BLAS, which shows that libopenblas is getting linked to EIGEN.
Can you please suggest what is the problem in the above procedure ?
How can we validate OpenBLAS is actually getting used?
The text was updated successfully, but these errors were encountered:
BTW, as a meta-comment, Eigen is quite deeply integrated with TensorFlow. An alternative to replacing Eigen for some functionality, would be to add new op which calls OpenBLAS explicitly. This is what's done for MKL integration of matmul -- #7333
Hello, we are moving support issues from GitHub to StackOverflow. This question is better asked on StackOverflow. It is easier for users to discover support isssues on StackOverflow. There is also a larger community that reads questions there. I will close the issue here. Please post it on StackOverflow.
Hi,
Im trying to use OpenBLAS for gemm operations instead of EIGEN with tensorflow.
I have followed the steps given in
http://eigen.tuxfamily.org/dox-devel/TopicUsingBlasLapack.html
and compiled the tensoflow android demo application with -DEIGEN_USE_BLAS support and have linked the libopenblas.a to EIGEN by placing the OpenBLAS headers and static library in eigen_archive along with BUILD file.
The BUILD File of OpenBLAS is as follows:
licenses(["notice"])
cc_library(
name = "openblas",
hdrs = glob(["include/*.h"]),
srcs = ["lib/libopenblas.a"],
visibility = ["//visibility:public"],
)
The BUILD file of EIGEN has been appended to include and link the openblas library as follows:
cc_library(
name = "eigen",
hdrs = EIGEN_MPL2_HEADER_FILES,
defines = [
# This define (mostly) guarantees we don't link any problematic
# code. We use it, but we do not rely on it, as evidenced above.
"EIGEN_MPL2_ONLY",
],
includes = ["."],
copts = ["-IOpenBLAS/include"],
deps = ["//OpenBLAS:openblas"],
visibility = ["//visibility:public"],
)
The build is given as follows:
bazel build --copt=-DEIGEN_USE_BLAS --fat_apk_cpu=arm64-v8a //tensorflow/examples/android:tensorflow_demo --verbose_failures
The Build is completed successfully and im able to run the apks installed on the target. But the print statements which i have put in OpenBLAS and Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h using android logging LOGI or LOGD doesnt get displayed in logcat of the device.
The Build fails if i dont link the openblas library in EIGEN BUILD file and use -DEIGEN_USE_BLAS, which shows that libopenblas is getting linked to EIGEN.
Can you please suggest what is the problem in the above procedure ?
How can we validate OpenBLAS is actually getting used?
The text was updated successfully, but these errors were encountered: