Comments (6)
That method doesn't seem to work anymore, likely because the llvm-project
source is patched when retrieved by Bazel, which doesn't happen when a local repo is used in accordance with those instructions.
However, with some minimal hacking, you can specify a particular commit/tag like so:
vladbelit@a17f4c1
(if you use a tagged archive, you might need to change strip_prefix
, etc.)
In order to retrieve the SHA256 for a particular archive:
wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-18.1.7.tar.gz
shasum -a 256 llvmorg-18.1.7.tar.gz
Btw, even though the Docker image you're using works fine in your case, it's no longer supported.
You should use one from here: https://hub.docker.com/r/tensorflow/build/tags
Something like: docker pull tensorflow/build:latest-python3.12
It already contains Clang 17 (Clang 18 soonish).
Installing Python + setting up a Virtual env is no longer necessary, as Tensorflow's Python has been hermetic for some time now (except maybe in some cases??)
from tensorflow.
Possible workaround. Add these dependecies in the top level WORKSPACE
file:
http_archive(
name = "llvm_zstd",
build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
url = "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
)
http_archive(
name = "llvm_zlib",
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
strip_prefix = "zlib-ng-2.0.7",
url = "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
)
The compilation works but then it generates duplicate symbols from llvm_zstd
and net_zstd
and fails during the linking:
ERROR: /tensorflow_src/tensorflow/BUILD:1177:21: Linking tensorflow/libtensorflow_framework.so.2.18.0 [for tool] failed: (Exit 1): clang failed: error executing command (from target //tensorflow:libtensorflow_framework.so.2.18.0) /usr/lib/llvm-17/bin/clang @bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/libtensorflow_framework.so.2.18.0-2.params
ld.lld: error: duplicate symbol: FSE_versionNumber
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/net_zstd/_objs/zstdlib/entropy_common.pic.o:(FSE_versionNumber)
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/llvm_zstd/_objs/zstd/entropy_common.pic.o:(.text.FSE_versionNumber+0x0)
ld.lld: error: duplicate symbol: FSE_isError
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/net_zstd/_objs/zstdlib/entropy_common.pic.o:(FSE_isError)
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/llvm_zstd/_objs/zstd/entropy_common.pic.o:(.text.FSE_isError+0x0)
ld.lld: error: duplicate symbol: FSE_getErrorName
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/net_zstd/_objs/zstdlib/entropy_common.pic.o:(FSE_getErrorName)
>>> defined at entropy_common.c
>>> bazel-out/k8-opt-exec-50AE0418/bin/external/llvm_zstd/_objs/zstd/entropy_common.pic.o:(.text.FSE_getErrorName+0x0)
...
...
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
from tensorflow.
bump?
from tensorflow.
Hi @chudur-budur ,
- Thank you for the reporting issue. There are other issues in the same line which are assigned to eng team, we will provide the resolution once it resolved.
from tensorflow.
from tensorflow.
For a more robust solution, handing this off to MLIR
@d0k
from tensorflow.
Related Issues (20)
- bucketize -function wrong results on GPU HOT 2
- Tensorflow build without boringssl on Power architecture HOT 2
- Model works in tensorflow 2.15 perfectly but unable to import the model in tensorflow 2.16! HOT 4
- TFLite: Stable Delegate: C++ Example HOT 6
- TensorFlow v2.12.0 Not Supporting GPU on Ubuntu 22.04 with CUDA 12.4 and cuDNN 9.0 HOT 2
- Unable to use tf and its modules including keras and etc, where the tensorflow==2.15.1 and keras==2.15.0 HOT 5
- Relu activation in TF Lite model return the negative values HOT 2
- LSTM model conversion failed from 'from_keras_model' HOT 3
- C-API support for .keras models HOT 4
- tfm.nlp.layers.RelativePositionEmbedding HOT 2
- Document tf.Dataset.zip/map triggers tf.Dataset.shuffle HOT 1
- Data Service Dynamic sharding policy seems extremely slow HOT 11
- ModuleNotFoundError: No module named 'tflite_support.task' HOT 3
- Notebook is not working anymore HOT 3
- Kubernetes cluster resolver fails when running from within a K8S cluster.
- Tried multiple builds, Bazel, pip, file. non of it is working HOT 5
- tensorflow uninstallable HOT 1
- Python interpreter set from ./configure does not go with py_strict_test HOT 3
- TensorFlow Lite label_image fails to build with cmake HOT 6
- Tflite model fails on Android GPU delegate due to 'null pointer dereference' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.