MCPcopy Create free account

hub / github.com/cybertronai/gradient-checkpointing / functions

Functions280 in github.com/cybertronai/gradient-checkpointing

↓ 36 callersFunctionsessrun
(*args, **kwargs)
test/memory_test.py:38
↓ 32 callersMethodwrite
(self, line)
test/deep_resnet_benchmark.py:160
↓ 25 callersFunctiondebug_print
Like logger.log, but also replaces all TensorFlow ops/tensors with their names. Sensitive to value of DEBUG_LOGGING, see enable_debug/disable_debug
memory_saving_gradients.py:371
↓ 24 callersMethod__enter__
(self)
test/util.py:270
↓ 18 callersFunctioncpu_peak
()
test/memory_test.py:66
↓ 18 callersFunctioncreate_session
()
test/memory_test.py:52
↓ 16 callersMethodupdate
(self, items)
test/linearize.py:274
↓ 14 callersFunctionblock_layer
Creates one layer of blocks for the ResNet model. Args: inputs: A tensor of size [batch, channels, height_in, width_in] or [batch, height
test/resnet_model.py:187
↓ 11 callersFunctionget_var_maybe_avg
utility for retrieving polyak averaged params
test/pixel_cnn_pp/nn.py:111
↓ 11 callersFunctionint_shape
(x)
test/pixel_cnn_pp/nn.py:9
↓ 10 callersFunctionconv2d_fixed_padding
Strided 2-D convolution with explicit padding. The padding is consistent and is based only on `kernel_size`, not on the dimensions of `inputs` (a
test/resnet_model.py:83
↓ 9 callersFunctionbatch_norm_relu
Performs a batch normalization followed by a ReLU.
test/resnet_model.py:42
↓ 9 callersFunctionmake_chain_tanh_constant
Creates chain of length length. First node is constant, rest are tanh. Returns list of nodes. Advantage over make_chain_tanh is that unlike Variab
test/util.py:183
↓ 8 callersMethodadd
(self, x)
test/linearize.py:290
↓ 8 callersFunctionmake_resnet
Creates resnet-like chain of length length. First node is constant, rest are tanh. Returns list of nodes. Has length - 2 articulation points (ie
test/util.py:219
↓ 6 callersFunction_create_session
()
test/linearize_test.py:148
↓ 5 callersFunctionalphasorted
sort list by op.name.
test/linearize.py:57
↓ 5 callersFunctiongradient_memory_measure_mb
Evaluates gradient, prints peak memory in MBs.
test/resnet_correctness_test.py:117
↓ 5 callersFunctiongradient_memory_measure_mb
Evaluates gradient, prints peak memory in MBs.
test/resnet_test.py:116
↓ 4 callersFunction_chain_backprop
Creates forward backward graph using tf.gradients. A0->A1->A2->..->An / / / B0<-B1<-B2<-..<-Bn
test/mem_util_test.py:13
↓ 4 callersMethodflush
(self)
test/deep_resnet_benchmark.py:169
↓ 4 callersFunctionget_name
utlity for keeping track of layer names
test/pixel_cnn_pp/nn.py:151
↓ 4 callersFunctiongradients
Authors: Tim Salimans & Yaroslav Bulatov memory efficient gradient implementation inspired by "Training Deep Nets with Sublinear Memory Cost
memory_saving_gradients.py:42
↓ 4 callersFunctionmodel
(inputs, is_training)
test/resnet_model.py:247
↓ 4 callersFunctionsessrun
(*args, **kwargs)
test/resnet_correctness_test.py:87
↓ 4 callersFunctionto_ops
(ll)
test/linearize.py:102
↓ 4 callersFunctiontostr
(l)
test/deep_imagenet_benchmark.py:205
↓ 3 callersFunction_create_cifar_resnet_loss
Creates loss tensor for resnet model.
test/linearize_test.py:155
↓ 3 callersFunctioncreate_session
Create session with optimizations disabled.
test/mem_util_test.py:56
↓ 3 callersMethodgetvalue
(self)
test/util.py:305
↓ 3 callersFunctionmake_chain_tanh
Creates chain of length length. First node is Variable, rest are tanh. Returns nodes. Note, if length is 1, there are no non-linearities in the gr
test/util.py:164
↓ 3 callersFunctionmake_feed_dict
(data, init=False)
test/pixel_cnn_test.py:179
↓ 3 callersFunctionsessrun
Helper method to use instead of sess.run that will automatically capture run_metadata.
test/mem_util_test.py:41
↓ 3 callersFunctionsessrun
(*args, **kwargs)
test/resnet_test.py:86
↓ 3 callersFunctiontf_gradients
Decorate tf.gradients calls with explicit device placement to avoid memory leaks when splitting model across multiple GPUs
memory_saving_gradients.py:21
↓ 3 callersFunctionto_op
(tensor_or_op)
test/linearize.py:96
↓ 2 callersMethod__contains__
(self, key)
test/linearize.py:281
↓ 2 callersMethod__del__
(self)
test/deep_resnet_benchmark.py:175
↓ 2 callersFunction_is_variable_op
(op)
test/linearize.py:240
↓ 2 callersFunction_process_targets
Helper utility to help variation in targets input type: -- it can be iterable vs simple list -- it can contain Operation objects or Tensor objects
test/linearize.py:374
↓ 2 callersFunction_simplify_device_name
/job:localhost/replica:0/task:0/device:CPU:0 -> /cpu:0
test/mem_util.py:155
↓ 2 callersFunction_timeline_from_nodestats
Return sorted memory allocation records from list of nodestats [NodeExecStats, NodeExecStats...], it's the run_metadata.step_stats.dev_stats[0].st
test/mem_util.py:70
↓ 2 callersFunction_unsparsify
(x)
memory_saving_gradients.py:292
↓ 2 callersFunctionconv2d
convolutional layer
test/pixel_cnn_pp/nn.py:189
↓ 2 callersFunctiondeconv2d
transposed convolutional layer
test/pixel_cnn_pp/nn.py:219
↓ 2 callersFunctionfast_backward_ops
(within_ops, seed_ops, stop_at_ts)
memory_saving_gradients.py:331
↓ 2 callersFunctionfetch
(url, filepath)
test/data/imagenet_data.py:17
↓ 2 callersFunctionformat_children
(children)
test/linearize.py:156
↓ 2 callersFunctionformat_ops
Helper method for printing ops. Converts Tensor/Operation op to op.name, rest to str(op).
memory_saving_gradients.py:383
↓ 2 callersFunctionformat_ops
Helper method for printing ops. Converts Tensor/Operation op to op.name, rest to str(op).
test/util.py:41
↓ 2 callersFunctiongradient_memory_mbs
Evaluates gradient, prints peak memory.
test/imagenet_test.py:159
↓ 2 callersFunctionhash_graph
Convert graph nodes to hashes (networkx is_isomorphic needs integer nodes).
test/util.py:113
↓ 2 callersFunctioninitialize_control_outputs
(g=None)
test/linearize.py:47
↓ 2 callersFunctionis_list_or_tuple
(o)
test/linearize.py:367
↓ 2 callersFunctionlinearize
Obtain a single valid execution order which approximately minimizes peak memory usage. TODO: deprecate/hide modify_graph arg Args: targets:
test/linearize.py:414
↓ 2 callersFunctionlog_sum_exp
numerically stable log_sum_exp implementation that prevents overflow
test/pixel_cnn_pp/nn.py:17
↓ 2 callersFunctionmake_leaf
(i)
test/linearize_test.py:351
↓ 2 callersFunctionmake_leaf
(i)
test/util.py:140
↓ 2 callersFunctionmemory_test
Evaluates gradient, returns memory in MB's and gradient eval time in seconds.
test/deep_resnet_benchmark.py:122
↓ 2 callersFunctionmemory_test
Evaluates gradient, returns memory in MB's and gradient eval time in seconds.
test/deep_imagenet_benchmark.py:136
↓ 2 callersFunctionmemsorted
Sort nodes by estimated memory usage.
test/linearize.py:341
↓ 2 callersFunctionmy_add_control_inputs
(wait_to_do_ops, inputs_to_do_before)
memory_saving_gradients.py:395
↓ 2 callersFunctionnode_memory
(unused_node, default_memory=1)
test/linearize.py:344
↓ 2 callersFunctionprojection_shortcut
(inputs)
test/resnet_model.py:211
↓ 2 callersMethodreset
(self)
test/data/cifar10_data.py:89
↓ 2 callersFunctionreversed_graph
Reverses direction of all edges in the graph.
test/linearize.py:316
↓ 2 callersFunctionrun_grads
Runs optimization for few steps, returns loss.
test/imagenet_correctness_test.py:144
↓ 2 callersFunctionsessrun
(*args, **kwargs)
test/imagenet_test.py:78
↓ 2 callersFunctionsessrun
(*args, **kwargs)
test/deep_resnet_benchmark.py:91
↓ 2 callersFunctionsessrun
(*args, **kwargs)
test/deep_imagenet_benchmark.py:105
↓ 2 callersFunctiontest_chain_memory
Like test_chain, but use automatic rewriting with checkpoints="memory" strat.
test/memory_test.py:289
↓ 2 callersFunctiontest_long_chain_memory
Like test_chain, but use automatic rewriting with checkpoints="memory" strategy.
test/memory_test.py:350
↓ 2 callersFunctiontest_long_resnet_rewrite_memory
(linearize=False)
test/memory_test.py:542
↓ 2 callersFunctiontest_minimal_resnet
(linearize=False)
test/memory_test.py:422
↓ 2 callersFunctiontest_resnet_rewrite
(linearize=False)
test/memory_test.py:482
↓ 2 callersFunctiontest_resnet_rewrite_memory
(linearize=False)
test/memory_test.py:612
↓ 2 callersFunctiontest_toposort
()
test/linearize_test.py:41
↓ 2 callersFunctiontf_toposort
(ts, within_ops=None)
memory_saving_gradients.py:313
↓ 2 callersFunctiontrain_mnist
()
test/mnist_correctness_test.py:159
↓ 2 callersFunctionunpickle
(file)
test/data/cifar10_data.py:29
↓ 1 callersFunction_create_imagenet_resnet_loss
Creates loss tensor for resnet model.
test/linearize_test.py:179
↓ 1 callersFunction_device_stats_dict
Returns dictionary of device_name->[NodeExecStats, NodeExecStats...]
test/mem_util.py:164
↓ 1 callersMethod_format_op
(self, op)
test/linearize.py:302
↓ 1 callersFunction_is_iterable
(o)
memory_saving_gradients.py:363
↓ 1 callersFunction_make_simple_caterpillar_graph
Length is number of concats.
test/linearize_test.py:348
↓ 1 callersFunction_peak_from_nodestats
Given a list of NodeExecStats messages, construct memory timeline.
test/mem_util.py:119
↓ 1 callersFunction_position_of_largest
Return index of largest entry
test/mem_util.py:113
↓ 1 callersFunction_print_parsed_timeline
pretty print parsed memory timeline.
test/mem_util.py:136
↓ 1 callersFunction_run_after
Force operation a to run after b. Do not add control dependencies to ops that already run after. Returns 0 if no dependencies were added, 1 otherw
test/linearize.py:32
↓ 1 callersFunction_sort
Sorts nodes according to order provided. Args: nodes: nodes to sort total_order: list of nodes in correct order dedup: if True, also
test/linearize.py:490
↓ 1 callersFunction_to_op
(tensor_or_op)
memory_saving_gradients.py:353
↓ 1 callersFunction_to_ops
(iterable)
memory_saving_gradients.py:358
↓ 1 callersFunctionchildren
(op, restrict_to=None)
test/linearize.py:72
↓ 1 callersFunctionchildren
(op)
test/util.py:103
↓ 1 callersFunctionchildren_with_controls
Returns children, counting control outputs as children.
test/linearize.py:80
↓ 1 callersFunctioncopy_graph
Return parts of the graph needed to compute targets.
test/linearize.py:229
↓ 1 callersFunctioncreate_loss
Creates loss tensor for resnet model.
test/deep_resnet_benchmark.py:71
↓ 1 callersFunctioncreate_loss
Creates loss tensor for resnet model.
test/resnet_correctness_test.py:67
↓ 1 callersFunctioncreate_loss
Creates loss tensor for resnet model.
test/resnet_test.py:66
↓ 1 callersFunctioncreate_loss
Creates loss tensor for resnet model.
test/deep_imagenet_benchmark.py:87
next →1–100 of 280, ranked by callers