Metadata-Version: 2.1
Name: veda-tensorflow
Version: 2.11.1.post6
Requires-Python: >=3.7
Summary: VEDA Tensorflow
Author: Nicolas Weber
Author-email: nicolas.weber@neclab.eu
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: C
Classifier: Programming Language :: C++
Download-URL: https://github.com/sx-aurora/veda-tensorflow/tags
License: 3 BSD-License
Platform: linux_x86_x64
Requires-Dist: veda (>= 2.0.1, < 3)
Requires-Dist: tungl (>= 0.1.3, < 0.2)
Requires-Dist: veda-tensors (>= 0.1.4, < 0.2)
Requires-Dist: tensorflow==2.11.1
Description-Content-Type: text/markdown

# VEDA TensorFlow

VEDA TensorFlow is a library to add device support for the NEC SX-Aurora TSUBASA
into TensorFlow using the Pluggable Device API.

[![Github](https://img.shields.io/github/v/tag/sx-aurora/veda-tensorflow?display_name=tag&sort=semver)](https://github.com/sx-aurora/veda)
[![PyPI](https://img.shields.io/pypi/v/veda-tensorflow)](https://pypi.org/project/veda-tensorflow)
[![License](https://img.shields.io/pypi/l/veda-tensorflow)](https://pypi.org/project/veda-tensorflow)
![Python Versions](https://img.shields.io/pypi/pyversions/veda-tensorflow)
![Linux](https://svgshare.com/i/Zhy.svg)
![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
![Maintenance](https://img.shields.io/pypi/dm/veda-tensorflow)

## Release Notes
<table>
<tr><th>Version</th><th>Comment</th></tr>

<tr><td>v6</td><td>
<ul>
	<li>Added TF v2.11.* support</li>
	<li>Added TF v2.10.* support</li>
	<li>Upgraded to VEDA CPP API</li>
</ul>
</td></tr>

<tr><td>v5</td><td>
<ul>
	<li>Added TF v2.9.* support</li>
</ul>
</td></tr>

<tr><td>v4</td><td>
<ul>
	<li>Added BroadcastTo operation</li>
	<li>Increased <code>host_memory_allocate</code> alignment to be 64, as lower values keep failing in <code>isAligned()</code></li>
</ul>
</td></tr>

<tr><td>v3</td><td>
<ul>
	<li>Bugfixes for loss functions</li>
	<li>Added missing optimizers: SGD, Adadelta, Adagrad, Adam, and Adamax</li>
	<li>Fixed possible segfault in PluggableDevice <code>host_memory_allocate</code></li>
</ul>
</td></tr>

<tr><td>v2</td><td>
<ul>
	<li>Minor changes to enable TF v2.7.1 and v2.8.0</li>
	<li>Fixed vedaInit error checking to ignore if already initialized</li>
</ul>
</td></tr>

<tr><td>v1</td><td>
Initial Release
</td></tr>

</table>

## F.A.Q.
### I get the error message: "Internal: platform is already registered with name: "NEC_SX_AURORA"

This error is caused by the combination of RH-Python38 package and using a
VirtualEnv. Due to [improper checking for symlinks in
TensorFlow](https://github.com/tensorflow/tensorflow/issues/55497) the device
support library gets loaded and initialized twice causing this error message.

You can use the following workaround as long as the bug is not resolved in
TensorFlow.

```python
# BEGIN BUGFIX
import sys
import os

sys.path = list(set(os.path.realpath(p) for p in sys.path))

import site
getsitepackages = site.getsitepackages
def getsitepackages_(prefixes=None):
    return list(filter(lambda x: 'lib64' not in x, getsitepackages(prefixes)))
site.getsitepackages = getsitepackages_
# END BUGFIX

import tensorflow
...
```