Skip to content

Commit

Permalink
Deprecate the tensorflow frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun committed Jan 10, 2021
1 parent 205d7c9 commit 67cbab9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ exclude_lines =
if __name__ == .__main__.:
pass

# Omit files that cannot be tested
omit =
# Omit files that cannot be tested
dace/jupyter.py

# Omit deprecated files
dace/frontend/tensorflow/__init__.py
dace/frontend/tensorflow/tensorflow.py
dace/frontend/tensorflow/winograd.py
dace/frontend/tensorflow/transformations/__init__.py
dace/frontend/tensorflow/transformations/redundant_array.py
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

_Decoupling domain science from performance optimization._

DaCe compiles code in various programming languages and paradigms (Python/Numpy, MATLAB, TensorFlow) and maps it efficiently to **CPUs, GPUs, and FPGAs** with high utilization, on par with the state-of-the-art. The key feature driving DaCe is its Stateful DataFlow multiGraph (SDFG) *data-centric intermediate representation*: A transformable, interactive representation of code based on data movement.
With data-centric parallel programming, we enable **direct knowledge transfer** of performance optimization, regardless of the scientific application or the target processor.
DaCe is a parallel programming framework that takes code in Python/NumPy and other programming languages, and maps it to high-performance **CPU, GPU, and FPGA** programs, which can be optimized to achieve state-of-the-art. Internally, DaCe uses the Stateful DataFlow multiGraph (SDFG) *data-centric intermediate representation*: A transformable, interactive representation of code based on data movement.
Since the input code and the SDFG are separate, it is posible to optimize a program without
changing its source, so that it stays readable. On the other hand, transformations are customizable and user-extensible, so they can be written once and reused in many applications.
With data-centric parallel programming, we enable **direct knowledge transfer** of performance optimization, regardless of the application or the target processor.

DaCe generates high-performance programs for:
* Multi-core CPUs (tested on Intel and IBM POWER9)
Expand Down Expand Up @@ -48,7 +50,7 @@ Runtime dependencies:
Running
-------

**Python scripts:** Run DaCe programs (in implicit, explicit, or TensorFlow syntax) using Python directly.
**Python scripts:** Run DaCe programs (in implicit or explicit syntax) using Python directly.

**[SDFV (standalone SDFG viewer)](https://spcl.github.io/dace/sdfv.html):** To view SDFGs separately, run the `sdfv` installed script with the `.sdfg` file as an argument. Alternatively, you can use the link or open `diode/sdfv.html` directly and choose a file in the browser.

Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ignore:
- "dace/jupyter.py" # Omit files that cannot be tested
- "dace/frontend/tensorflow/**/*" # Omit deprecated files

coverage:
range: 40..90
Expand Down
11 changes: 9 additions & 2 deletions dace/frontend/tensorflow/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import re
import math
from typing import Any, List
import warnings

import dace
from dace.memlet import Memlet
Expand Down Expand Up @@ -130,6 +131,11 @@ def __init__(self, name: str = "tfsession", seed: int = None, config=None):
:param name: (optional) The name of the resulting SDFG.
:param seed: (optional) Fix random seed.
"""
warnings.warn(
'The TensorFlow DaCe frontend has been deprecated and will be '
'removed in a future version, please use daceml instead:\n'
'https://github.com/spcl/daceml', DeprecationWarning)

self._internal_session = tf.Session(config=config)

# Set for bookkeeping of already visited nodes
Expand Down Expand Up @@ -734,8 +740,9 @@ def tensorflow_callback(tf_op, *inputList, num_outputs=0):
*callback_input_types))

# Register callback in SDFG
node_name, _ = self.graph.add_scalar(
node_name, dace_data_scalar.dtype, find_new_name=True)
node_name, _ = self.graph.add_scalar(node_name,
dace_data_scalar.dtype,
find_new_name=True)
self.callbackTypeDict[node_name] = dace_data_scalar
self.callbackFunctionDict[node_name] = tensorflow_callback

Expand Down

0 comments on commit 67cbab9

Please sign in to comment.