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_allparameter fromIPUOutfeedQueue.Use
outfeed_modeparameter instead.
tensorflow.python.ipu.ipu_pipeline_estimator
Removed
pipeline_depthparameter fromIPUPipelineEstimatorSpec.Use
gradient_accumulation_count parameter instead.
tensorflow.python.ipu.utils
Removed
retain_control_dependenciesparameter fromcreate_ipu_config.Only removed in TensorFlow 2.1.
Removed
max_cross_replica_sum_buffer_size, andmax_inter_ipu_copies_buffer_sizeparameters fromcreate_ipu_config.Use
set_optimization_optionsinstead.Removed
report_optionsparameter fromset_report_options.Use
graph_optionsandexecution_optionsparameters instead.Removed
allow_stateful_recomputeparameter fromset_recomputation_options.Pipelining recomputation will recompute all the non-stateful operations when recomputation is enabled.
Removed
num_io_tilesfromset_gcl_options.Use the
set_io_tile_optionsinstead.
tensorflow.python.ipu.ops.embedding_ops.embedding_lookup
Removed
one_hot_thresholdandmin_encoding_sizeparameters fromembedding_lookup.Removed
countparameter fromHostEmbeddingScope.lookup.
tensorflow.python.ipu.ops.functional_ops
Removed
function.Use
outlined_functioninstead.
tensorflow.python.ipu.ops.normalization_ops
Removed
reduction_axesparameter fromgroup_norm,layer_norm, andinstance_norm.
tensorflow.python.ipu.ops.pipelining_ops
Removed
pipeline_depthparameter frompipeline.Use
gradient_accumulation_countinstead.
tensorflow.python.ipu.ops.rnn_ops
Removed support for passing a tuple as the
initial_stateargument forPopnnLSTM.call.This must be an
LSTMStateTuplenow.
The following deprecated namespace has been removed:
tensorflow.python.ipu.ipu_optimizerUse the
tensorflow.python.ipu.optimizersnamespace 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.