Task :
I am trying to build TensorFlow Library with bazel using OpenCL in order to run the operations on GPU without enabling GPU of Tensorflow (without CUDA/NVIDIA).
Basically want to run on mobile GPU with the help of Android NDK and the built opencl-tensorflow library)
Steps Taken:
Replace the eigen_archive libray in /home/ashok/.cache/bazel/_bazel_ashok/337a0d8d7fbaddcaa8098e349718a6d6/external with 'eigen-opencl' library of https://bitbucket.org/benoitsteiner/eigen-opencl and build TensorFlow using bazel.
Issues Faced: 'half' is not a member of 'Eigen'
INFO: Found 1 target...
ERROR: /home/ashok/Ashok/tensorflow-1.0.1/tensorflow/core/BUILD:814:1: C++ compilation of rule '//tensorflow/core:android_tensorflow_lib_lite' failed (Exit 1)
In file included from ./tensorflow/core/framework/allocator.h:25:0,
from ./tensorflow/core/framework/op_kernel.h:22,
from ./tensorflow/core/util/guarded_philox_random.h:19,
from tensorflow/core/util/guarded_philox_random.cc:16:
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
./tensorflow/core/framework/type_traits.h:69:63: error: template argument 2 is invalid
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
Target //tensorflow/examples/android:tensorflow_demo failed to build
Please help in resolving the issue
Use https://bitbucket.org/benoitsteiner/opencl instead of https://bitbucket.org/benoitsteiner/eigen-opencl as it is the most updated repository
Related
I have not yet been able to successfully build skia from source code on Windows 10. I am going in circles at this point.
I followed the official instructions here https://skia.org/user/build but always get errors.
gn args are:
is_official_build=true
is_component_build = false
win_vc="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC"
skia_use_libpng=false
skia_use_icu=false
skia_use_zlib=false
skia_use_libwebp=false
skia_enable_pdf=false
skia_use_libjpeg_turbo=false
skia_use_expat=false
I get the following error:
C:\Development\skia\bin>ninja -C out/Static
ninja: Entering directory `out/Static'
[13/2662] copy ../../../third_party/externals/icu/common/icudtl.dat icudtl.dat
FAILED: icudtl.dat
python C:/Development/skia/gn/cp.py ../../../third_party/externals/icu/common/icudtl.dat icudtl.dat
CreateProcess failed: The system cannot find the file specified.
ninja: fatal: ReadFile: The handle is invalid.
Any thoughts would be appreciated.
By the way, first attempt at:
using gn or ninja to build anything
using Chromium's depot_tools
So, I am not ruling out any user error on my part :(
I'm attempting to use bazel to build tensorflow-serving from https://github.com/tensorflow/serving on CentOS 7.3. My gcc version is 4.8.5, bazel version is 0.10.1. I am sure that I followed the install introduction and I have set up all prerequisites requested. Every time I run the command :
bazel build -c opt tensorflow_serving/model_servers/...
it will run for about 10~15 minutes and later stopped by an error:
ERROR:
/root/.cache/bazel/_bazel_root/2d16d9349bff8cf3d8fc4a53d2a23056/external/org_tensorflow/tensorflow/core/kernels/BUILD:3120:1: C++ compilation of rule '#org_tensorflow//tensorflow/core/kernels:conv_ops' failed (Exit 4)
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
INFO: Elapsed time: 881.803s, Critical Path: 37.21s
FAILED: Build did NOT complete successfully
If I try another command :
bazel build -c opt tensorflow_serving/model_servers/...
to specifically build a subdirectory of serving, error comes like this:
ERROR:
/home/serving/tensorflow_serving/batching/BUILD:122:1: C++ compilation of rule '//tensorflow_serving/batching:batching_util' failed (Exit 4)
tensorflow_serving/batching/batching_util.cc: In function 'std::map<std::basic_string<char>, std::vector<int> > tensorflow::serving::CalculateMaxDimSizes(const std::vector<std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> > >&)':
tensorflow_serving/batching/batching_util.cc:165:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < batch.size(); ++i) {
^
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
INFO: Elapsed time: 1486.641s, Critical Path: 211.94s
FAILED: Build did NOT complete successfully
Please forgive my poor English and help me ... I have been stuck in this problem for quite a long time.
Found a similar issue (349) on TensorFlow's Github, and it is very probable that you are running out of memory. They suggest adding the argument "--jobs 1 --local_resources 2048,.5,1.0" so that Bazel spawns no more than one compiler process at a time and limits system resource usage.
I figured out the problem. Your memory is not sufficient. Adding arguments --local_resource and --jobs actually does not help. Then I tried to use a google cloud instance with 4 cpus and 25G memory to build. I found that the build process may need 8G memory at a peak time. So your 1.8G memory is not sufficient.
I've build a Linux image for freescale imx6qpsabreai board and SDK with toolchain which works well on Linux.
Now I want to support development on Windows and following this post I've
downloaded oe meta-mingw into sources/meta-openembedded/meta-mingw
added SDKMACHINE=x86_64-mingw32 to local.conf in my project
however, I can't build new SDK this way.
~/yocto/fsl-community-bsp/build_fsl_framebuffer$ bitbake fsl-image-machine-test -c populate_sdk
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 2 entries from dependency cache.
ERROR: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb: Error executing a python function in <code>: | ETA: --:--:--
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 13, function: <module>
0009:__anon_35__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_devshell_bbclass(d)
0010:__anon_106__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_sstate_bbclass(d)
0011:__anon_45__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_blacklist_bbclass(d)
0012:__anon_158__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_siteinfo_bbclass(d)
*** 0013:__anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb(d)
File: '/home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb', lineno: 28, function: __anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb
0024:inherit autotools pkgconfig gettext
0025:
0026:python __anonymous() {
0027: if d.getVar("TARGET_OS") != "linux":
*** 0028: return
0029: if d.getVar("TCLIBC") == "glibc":
0030: raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
0031:}
0032:
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
ERROR: Failed to parse recipe: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Also, I am not an experienced C/C++ programmer, but from my point of view mingw doesn't contain compiler for arm architecture, so maybe I just can't get arm toolchain to use on Windows?
meta-mingw builds a cross compile from Linux to Windows (mingw). It then uses this cross compiler to construct a standard toolchain from (mingw) to the target SDK environment. You are using the correct layer, but have a different problem.
It appears that you are using a layer (meta-mingw) that is expecting the newer bitbake semantics:
0027: if d.getVar("TARGET_OS") != "linux":
*** 0028: return
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
Bitbake used to require two arguments to 'd.getVar', and now only requires one (the second is optional).
I would suggest that you identify which version of oe-core/poky you are using and get a matching version of meta-mingw. (It may be as simple as checking out the correct branch.)
I can install dbscan on my laptop, no problem.
But it is not installing on a linux cluster I use for big data.
I have tried with R 3.3.3 and 3.4.0. I get the same error after invoking
install.packages("dbscan")
Error Message:
buildHDBSCAN.cpp(45): error: more than one operator "==" matches these operands:
built-in operator "pointer == pointer"
function "Rcpp::operator==(Rcpp::Na_Proxy, SEXP)"
operand types are: Rcpp::internal::generic_name_proxy<19> == SEXP
if (!hcl.containsElementNamed("labels") || hcl["labels"] == R_NilValue){
^
compilation aborted for buildHDBSCAN.cpp (code 2)
make: ***
[/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2 /Compiler/intel2016.4/r/3.3.3/lib64/R/etc/Makeconf:141: buildHDBSCAN.o] Error 2
ERROR: compilation failed for package ‘dbscan’
removing ‘/home/xxxxxx/R/x86_64-pc-linux-gnu-library/3.3/dbscan’
The downloaded source packages are in
‘/tmp/RtmpI1SJp8/downloaded_packages’
Warning message:
In install.packages("dbscan") :
installation of package ‘dbscan’ had non-zero exit status
I'm trying to create postgresql plugin for Symbian device but I can't compile it. I'm working on Windows 7 64bit.
I did everything according to this article: http://doc.qt.io/archives/qt-4.7/sql-driver.html#qpsql
C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>qmake "INCLUDEPATH+=C:\Program Files (x86)\PostgreSQL\8.3\include" "LIBS+=C:\Program Files (x86)\PostgreSQL\8.3\lib\libpq.lib" psql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.
So, it looked OK. Then...
C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe is not recognized as an internal or external command, operable program or batch file.
make: *** [debug-gcce] Error 9009
I noticed, that sbs_home was set to python directory but it was not in the path, then the make could not find the script raptor_start.py:
C:\...drivers\psql>echo %sbs_home%
C:\QtSDK\Symbian\tools\sbs\win32\python27
C:\...drivers\psql>set path=%path%;%sbs_home%
C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe: can't open file C:\QtSDK\Symbian\tools\sbs\win32\python27\python\raptor_start.py': [Errno 2] No such file or directory
make: *** [debug-gcce] Error 2
C:\...drivers\psql>set sbs_home=C:\QtSDK\Symbian\tools\sbs
so, when I started compiling I got this error:
C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/include/stdapis/stlportv5/stl/_istream.c:650: warning: suggest parentheses around '&&' within '||' target : epoc32\release\armv5\udeb\qsqlpsql.dll [arm.v5.udeb.gcce4_4_1]
FAILED linkandpostlink for arm.v5.udeb.gcce4_4_1: epoc32\release\armv5\udeb\qsqlpsql.dll
mmp: qsqlpsql_dll.mmp
c:/qtsdk/symbian/tools/gcce4/bin/../lib/gcc/arm-none-symbianelf/4.4.1/../../../../arm-none-symbianelf/bin/ld.exe: warning: C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/usrt3_1.lib(ucppinit.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/build/psql/c_8d95259b570e1766/qsqlpsql_dll/armv5/udeb/qsql_psql.o: In function `qMakeError': C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:175: undefined reference to `PQerrorMessage'
....many undefined references...
C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:117: undefined reference to `PQfreemem'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/qsqlpsql.dll] Error 1
sbs: error: The make-engine exited with errors.
sbs : warnings: 3
sbs : errors: 2
built 'arm.v5.udeb.gcce4_4_1'
Run time 5 seconds
sbs: build log in C:\QtSDK\Symbian\SDKs\Symbian3Qt474\epoc32\build\Makefile.2012-06-26-15-03-12.78-2996.log
make: *** [debug-gcce] Error 1
Has anybody idea, what with it?
You are trying to build an Symbian/ARM application using precompiled binary postgresql client library for Windows. This won't ever work. The instructions you refer to only show how to build for OS X, Unix and Mac targets natively. You're cross compiling for Symbian.
You'd first need to obtain a binary version of the postgresql client library compiled for Symbian. It might exist out there, or you may need to compile it yourself. I don't think that the library supports Symbian as a target, and I couldn't readily find any Symbian ports for download. You may be out of luck for a trivial solution. A port might not be entirely out of the question, though -- perhaps the platform-specific code is localized enough.