[fx/profiler] debug the fx.profiler / add an example test script for fx.profiler (#1730)

* [fx/profiler] add test.

* [fx] fix file names.

* [fx] add docstring and comment.

* [fx] polish profiler.py.

* [fx] fix import errors.

* [fx] fix profiler.

* [fx] fix names.
This commit is contained in:
Super Daniel
2022-10-19 14:24:51 +08:00
committed by GitHub
parent eee84908d4
commit 30874f1692
6 changed files with 283 additions and 23 deletions

View File

@@ -125,5 +125,5 @@ class MetaTensor(torch.Tensor):
device = kwargs['device']
result = super().to(*args, **kwargs)
if device is not None:
result = MetaTensor(deepcopy(result), fake_device=device)
result = MetaTensor(result, fake_device=device)
return result