Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I debug in nimble? #19

Open
ReaperMaKNaE opened this issue Oct 22, 2021 · 0 comments
Open

Can I debug in nimble? #19

ReaperMaKNaE opened this issue Oct 22, 2021 · 0 comments

Comments

@ReaperMaKNaE
Copy link

ReaperMaKNaE commented Oct 22, 2021

Thank you for great work.

I have a simple question, can I use a pdb in the model with nimble?

When I use pdb in the model and do nimble_model.prepare without any debug, it works. but try to call some value during debug, warning message comes out(just call, nothing change):

RuntimeWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results)

and after preparing, massive amount of the error comes out(below log shows a part of the error):

- %1403 : int[] = prim::ListConstruct(%37, %37, %37, %37), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5 ? -- ^ ^ ^ ^ + %1398 : int[] = prim::ListConstruct(%32, %32, %32, %32), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5 ? ++ ^ ^ ^ ^ - %input.38 : Tensor = aten::constant_pad_nd(%input.37, %1403, %39), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5 # /home/rpmk/anaconda3/envs/nimble/lib/python3.7/site-packages/torch/nn/functional.py:3553:0 ? ------- + %input.38 : Tensor = aten::constant_pad_nd(%input.37, %1398, %34), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5 # /home/rpmk/anaconda3/envs/nimble/lib/python3.7/site-packages/torch/nn/functional.py:3553:0 ? +++++++ - %1405 : int[] = prim::ListConstruct(%37, %37), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ + %1400 : int[] = prim::ListConstruct(%32, %32), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ - %1406 : int[] = prim::ListConstruct(%39, %39), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ + %1401 : int[] = prim::ListConstruct(%34, %34), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ - %1407 : int[] = prim::ListConstruct(%37, %37), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ + %1402 : int[] = prim::ListConstruct(%32, %32), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ - %1408 : int[] = prim::ListConstruct(%39, %39), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ + %1403 : int[] = prim::ListConstruct(%34, %34), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 ? ^^^ ^ ^ - %input.39 : Tensor = aten::_convolution(%input.38, %1018, %35, %1405, %1406, %1407, %38, %1408, %37, %38, %38, %38, %40), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 # /home/rpmk/anac onda3/envs/nimble/lib/python3.7/site-packages/torch/nn/modules/conv.py:420:0 - %input.40 : Tensor = aten::batch_norm(%input.39, %1013, %1008, %1003, %998, %38, %33, %34, %38), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.1 # /home/rpmk/anaconda3/envs/nimble/lib/pyt hon3.7/site-packages/torch/nn/functional.py:2058:0 + %input.39 : Tensor = aten::_convolution(%input.38, %1013, %30, %1400, %1401, %1402, %33, %1403, %32, %33, %33, %33, %35), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.0 # /home/rpmk/anac onda3/envs/nimble/lib/python3.7/site-packages/torch/nn/modules/conv.py:420:0 + %input.40 : Tensor = aten::batch_norm(%input.39, %1008, %1003, %998, %993, %33, %28, %29, %33), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.1 # /home/rpmk/anaconda3/envs/nimble/lib/pyth on3.7/site-packages/torch/nn/functional.py:2058:0 - %input.41 : Tensor = aten::hardtanh_(%input.40, %31, %32), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.2 # /home/rpmk/anaconda3/envs/nimble/lib/python3.7/site-packages/torch/nn/function al.py:1186:0 ? ^^ - + %input.41 : Tensor = aten::hardtanh_(%input.40, %26, %27), scope: __module.backbone/__module.backbone.high_level_features/__module.backbone.high_level_features.5/__module.backbone.high_level_features.5.conv/__module.backbone.high_level_features.5.conv.2 # /home/rpmk/anaconda3/envs/nimble/lib/python3.7/site-packages/torch/nn/function al.py:1186:0 ? ^^ +

Can I get any advices?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant