17. API changes
The following changes have been made to the TensorFlow API in the Poplar SDK version 2.0. This may require you to change your code.
17.1. Breaking changes
Warning
These will require changes to any code that uses them.
We have removed several items that have been deprecated for at least one release.
tensorflow.python.ipu.ipu_outfeed_queue
Removed
outfeed_all
parameter fromIPUOutfeedQueue
.Use
outfeed_mode
parameter instead.
tensorflow.python.ipu.ipu_pipeline_estimator
Removed
pipeline_depth
parameter fromIPUPipelineEstimatorSpec
.Use
gradient_accumulation_count parameter instead
.
tensorflow.python.ipu.utils
Removed
retain_control_dependencies
parameter fromcreate_ipu_config
.Only removed in TensorFlow 2.1.
Removed
max_cross_replica_sum_buffer_size
, andmax_inter_ipu_copies_buffer_size
parameters fromcreate_ipu_config
.Use
set_optimization_options
instead.Removed
report_options
parameter fromset_report_options
.Use
graph_options
andexecution_options
parameters instead.Removed
allow_stateful_recompute
parameter fromset_recomputation_options
.Pipelining recomputation will recompute all the non-stateful operations when recomputation is enabled.
Removed
num_io_tiles
fromset_gcl_options
.Use the
set_io_tile_options
instead.
tensorflow.python.ipu.ops.embedding_ops.embedding_lookup
Removed
one_hot_threshold
andmin_encoding_size
parameters fromembedding_lookup
.Removed
count
parameter fromHostEmbeddingScope.lookup
.
tensorflow.python.ipu.ops.functional_ops
Removed
function
.Use
outlined_function
instead.
tensorflow.python.ipu.ops.normalization_ops
Removed
reduction_axes
parameter fromgroup_norm
,layer_norm
, andinstance_norm
.
tensorflow.python.ipu.ops.pipelining_ops
Removed
pipeline_depth
parameter frompipeline
.Use
gradient_accumulation_count
instead.
tensorflow.python.ipu.ops.rnn_ops
Removed support for passing a tuple as the
initial_state
argument forPopnnLSTM.call
.This must be an
LSTMStateTuple
now.
The following deprecated namespace has been removed:
tensorflow.python.ipu.ipu_optimizer
Use the
tensorflow.python.ipu.optimizers
namespace instead.
17.2. Non-breaking changes
These changes are recommended.
17.2.1. IPUPipelineEstimator change
The definition for iterations_per_loop
has changed. Previously the number of
iterations was defined as the number of weight updates performed. The new
definition is the number of mini-batches consumed, which makes it consistent
with the IPUEstimator when using gradient accumulation. The old definition is
still used by default, but it will be removed in a future release.
Use the argument count_gradient_accumulation_as_iterations=True
to use the
new definition.
17.2.2. Autosharding deprecated
Autosharding has been deprecated, and will be removed in a future release. You should now use alternative execution modes such as pipelining instead.
17.2.3. IPU config change
The disable_graph_convolution_caching
parameter for create_ipu_config
(from tensorflow.python.ipu.utils
) has been deprecated as it has no effect.
It will be removed in a future release.
The disable_graph_outlining
parameter should be used instead.
17.2.4. IPU Keras changes [TensorFlow 2]
SequentialPipelineModel
has been renamed to PipelineSequential
for
consistency with its Model
counterpart. The old name can still be used, but
is deprecated and will be removed in a future release.
The accumulation_count
argument in the constructors of the
ipu.keras.Model
and ipu.keras.Sequential
has been renamed to
gradient_accumulation_count
to be consistent with the rest of the code base.
The old name can still be used, but is deprecated and will be removed in a
future release.
Similarly, accumulation_dtype
has been renamed to gradient_accumulation_dtype
.