facebookresearch / facebookresearch/fvcore

RuntimeError: Detected that you are using FX to torch.jit.trace a dynamo-optimized function. This is not supported at the moment.

Open
#150 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.3k
Forks
236
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm calculating flops for open-sora model with backbone of STDiT and three inputs: x, timestamp, and y, like the following:

from fvcore.nn import FlopCountAnalysis
flops = FlopCountAnalysis(model, (x, torch.randint(0, 10, (x.shape[0],), device=x.device), model_args['y']))
flops.total()

I get this error: "RuntimeError: Detected that you are using FX to torch.jit.trace a dynamo-optimized function. This is not supported at the moment."
Could you please advise if there is any solution to resolve this? Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.