C Tensorflow core changes in 2.4
See original GitHub issue“C-API functions TF_StringDecode, TF_StringEncode, and TF_StringEncodedSize are no longer relevant and have been removed; see core/platform/ctstring.h for string access/modification in C.”
This change has breaking building from source for tfjs-node-gpu.
tfjs_backend.cc
tfjs_binding.cc
win_delay_load_hook.cc
C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\binding\tfjs_backend.cc(216,18): error C3861: TF_StringEncodedSize: идентификатор не найден [C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\build\tfjs_binding.vcxproj]
C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\binding\tfjs_backend.cc(241,9): error C3861: TF_StringEncode: идентификатор не найден [C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\build\tfjs_binding.vcxproj]
C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\binding\tfjs_backend.cc(374,5): error C3861: TF_StringDecode: идентификатор не найден [C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\build\tfjs_binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\dev\\trading\\node_modules\\@tensorflow\\tfjs-node-gpu\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--build-from-source" "--module=C:\\dev\\trading\\node_modules\\@tensorflow\\tfjs-node-gpu\\lib\\napi-v6\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\dev\\trading\\node_modules\\@tensorflow\\tfjs-node-gpu\\lib\\napi-v6" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu
gyp ERR! node -v v12.19.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\node_modules\node-gyp\bin\node-gyp.js build --build-from-source --module=C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v6\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v6 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\dev\\trading\\node_modules\\@tensorflow\\tfjs-node-gpu\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--build-from-source"
node-pre-gyp ERR! cwd C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu
node-pre-gyp ERR! node -v v12.19.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\node_modules\node-gyp\bin\node-gyp.js build --build-from-source --module=C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v6\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\dev\trading\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v6 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
error Command failed with exit code 1.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
- TensorFlow.js installed from (npm or script link): npm
- TensorFlow.js version: 2.7.0
- CUDA/cuDNN version: 10.1, 7.6
Describe the problem Can’t build bindings
Provide the exact sequence of commands / steps that you executed before running into the problem
- Run: .\bazel.exe build --config=cuda --define=no_tensorflow_py_deps=true --config=opt --config=monolithic //tensorflow/tools/lib_package:libtensorflow
- Extract tar to deps
- Run node-pre-gyp rebuild
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What's new in TensorFlow 2.4?
With increased support for distributed training and mixed precision, new NumPy frontend and tools for monitoring and diagnosing bottlenecks, ...
Read more >TensorFlow 2.4.0 Released | Exxact Blog
The byte layout for string tensors across the C-API has been updated to match TF Core/C++; i.e., a contiguous array of tensorflow::tstring ...
Read more >TensorFlow Releases Its New Update: TensorFlow 2.4.0-rc4
Breaking changes · TF Core: Some float32 ops run in lower precision on Ampere based GPUs, including matmuls and convolutions, due to TensorFloat- ......
Read more >Release 2.4.0
... CHANGES>; The byte layout for string tensors across the C-API has been updated to match TF Core/C++; i.e., a contiguous array of...
Read more >21. TensorFlow API changes - Graphcore Documents
The tensorflow.python.ipu.ops.rnn_ops module has been removed (deprecated in Poplar SDK version 2.5). As a result, the following ops are no longer available - ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. I will take a look this week.
Made a draft at https://github.com/tensorflow/tfjs/pull/4810