ArmageddonKnight commented on a change in pull request #19154:
URL: https://github.com/apache/incubator-mxnet/pull/19154#discussion_r489700659
##########
File path: tests/python/gpu/test_profiler_gpu.py
##########
@@ -70,23 +74,20 @@ def test_gpu_memory_profiler_symbolic():
# Sample gpu_memory_profile.csv:
# "Attribute Name","Requested Size","Device","Actual Size","Reuse?"
+ # <unk>:_head_grad_0,16777216,0,16777216,0
# init:_random_uniform,33554432,0,33554432,1
# init:_random_uniform,8388608,0,8388608,1
# resource:temp_space (sample_op.h +365),8,0,4096,0
# symbol:arg_grad:unknown,8388608,0,8388608,0
# symbol:arg_grad:unknown,33554432,0,33554432,0
- # tensordot:dot,16777216,0,16777216,0
- # tensordot:dot_backward,33554432,0,33554432,0
- # tensordot:dot_backward,8388608,0,8388608,0
- # tensordot:dot_head_grad,16777216,0,16777216,0
+ # tensordot:dot0,16777216,0,16777216,0
# tensordot:in_arg:A,8388608,0,8388608,0
# tensordot:in_arg:B,33554432,0,33554432,0
+ # tensordot:node_0_backward,33554432,0,33554432,0
+ # tensordot:node_0_backward,8388608,0,8388608,0s
Review comment:
The reason why they are invoked is because
```Python
# executor.py
def forward(self, is_train=False, **kwargs):
...
with autograd.record(train_mode=is_train):
self.outputs = self._cached_op(*self._args,
default_ctx=default_ctx)
```
->
```Python
# ndarray.py
def __call__(self, *args, **kwargs):
check_call(_LIB.MXInvokeCachedOp(...
```
->
```C++
int MXInvokeCachedOp(...
...
op->Forward(op_shared, ndinputs, ndoutputs, ctx);
```
->
```C++
OpStatePtr CachedOp::Forward(...
...
op_state = DynamicForward(...
```
->
```C++
OpStatePtr CachedOp::DynamicForward(...
...
RunGraph(...
```
->
```C++
void RunGraph(...
...
if (recording) {
Imperative::Get()->RecordOp(...
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]