Repository: tensorflow
Issue: tensorflow-opt-cuda: error running on Linux via GPU
Labels: stat:awaiting tensorflower,type:build/install,subtype: ubuntu/linux,TF 2.18

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

tf 2.18.0

### Custom code

No

### OS platform and distribution

manjaro

### Mobile device

_No response_

### Python version

3.12.7

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

12.4

### GPU model and memory

RTX 4090 - 24GB

### Current behavior?

Hello all,
thank you for tensorflow!
I have installed:

`sudo pacman -S python-tensorflow-opt-cuda`

Actually I cannot run a tensorflow programm in IDE that runs well in windows - without GPU usage only on CPU.

I have this error on Manjaro - with GPU:

`Process finished with exit code 134 (interrupted by signal 6:SIGABRT)`

Python PyTorch on GPU just runs fine, though!

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler, OneHotEncoder
from sklearn import datasets


digits = datasets.load_digits()
#
#
# # 2. Skalieren der Merkmale auf den Bereich [0, 1]
scaler = MinMaxScaler()
digits_scaled = scaler.fit_transform(digits.data)
#

# # Creating the encoder
enc = OneHotEncoder(handle_unknown='ignore', sparse_output=False)
#
result = enc.fit_transform(digits.target.reshape(-1, 1))

ratio = 0.2
X_train, X_test, y_train, y_test = train_test_split(digits_scaled, result, test_size=ratio, random_state=42)

model1 = tf.keras.models.Sequential()
model1.add(tf.keras.layers.Input(X_train.shape[1:])) #Process finished with exit code 134 (interrupted by signal 6:SIGABRT)

# model1.add(tf.keras.layers.Dense(128, input_dim=64, activation="relu")) # hidden1
# model1.add(tf.keras.layers.Dense(64, activation="relu")) # hidden2
# model1.add(tf.keras.layers.Dense(10, activation='softmax')) # outputlayer
# model1.summary()
# model1.compile(loss="categorical_crossentropy", optimizer=tf.keras.optimizers.SGD(learning_rate=0.01), # Adam()
#                metrics=(['accuracy']))
```


### Relevant log output

```shell
   ~/PycharmProjects/alfatraining_projekt_4/week1    main  python digits_uebung.py                                                                                                                 ✔   
2024-12-20 07:53:19.219496: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734677599.229682    9678 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734677599.232640    9678 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
onehot labels:
 [[1. 0. 0. ... 0. 0. 0.]
 [0. 1. 0. ... 0. 0. 0.]
 [0. 0. 1. ... 0. 0. 0.]
 ...
 [0. 0. 0. ... 0. 1. 0.]
 [0. 0. 0. ... 0. 0. 1.]
 [0. 0. 0. ... 0. 1. 0.]]
/usr/include/c++/14.1.1/bits/stl_vector.h:1130: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = pybind11::object; _Alloc = std::allocator<pybind11::object>; reference = pybind11::object&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
zsh: IOT instruction (core dumped)  python digits_uebung.py
```