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

[Orin Nano] Error when trying to use sparsity #1874

Open
kyflores opened this issue Jan 8, 2025 · 0 comments
Open

[Orin Nano] Error when trying to use sparsity #1874

kyflores opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kyflores
Copy link

kyflores commented Jan 8, 2025

Hi,

I'm trying to use Apex's sparsity tools on an Orin Nano Super, running the Jetpack 6.1 SDCard image that was released recently with the Super devkit. To access torch, apex, etc, I'm running everything inside the nvcr.io/nvidia/pytorch:24.12-py3-igpu container.

Here's my minimal repro:

# root@4ddd9f30dc2e:/host# cat repro.py 
import torch
import torchvision
from apex.contrib.sparsity import ASP

model = torchvision.models.resnet18(weights=None)
model = model.cuda().train()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01, momentum=0.9, weight_decay=5e-4)
ASP.prune_trained_model(model, optimizer)

I would expect this to complete successfully, as this testcase seems to work on and x86_64 + RTX dGPU desktop using the analogous nvcr.io/nvidia/pytorch:24.12-py3 container.

Instead, it fails with this trace:
asp_error.log

I'm not sure what causes this,
AttributeError: 'ResNet' object has no attribute 'module'. Did you mean: 'modules'?

But I've seen other projects guard the torch.distributed calls with torch.distributed.is_available() to catch cases like the jetson torch build where distributed is disabled.

Thanks.

@kyflores kyflores added the bug Something isn't working label Jan 8, 2025
@kyflores kyflores changed the title [Orin Nano] [Orin Nano] Error when trying to use sparsity Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant