facebookresearch / facebookresearch/fvcore

baddbmm not supported

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

Description

As per title, baddbmm is not supported and is quite common

Can submit PR with below unless any issues/concerns...

```
def baddbmm_flop_jit(inputs: List[Any], outputs: List[Any]) -> Number:
"""
Count flops for fully connected layers.
"""
input_shapes = [get_shape(v) for v in inputs[1:3]]
n, c, t = input_shapes[0]
d = input_shapes[-1][-1]
flop = n * c * t * d
return flop
```

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.