Skip to content

Commit 831d22b

Browse files
dsharletgxnnpack-bot
authored andcommitted
Fix max number of dimensions used for std::bitset.
Internally, we add up to 2 dimensions on top of the limit in the public API. PiperOrigin-RevId: 832141894
1 parent cc6d52f commit 831d22b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ynnpack/subgraph/subgraph.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828

2929
namespace ynn {
3030

31-
using axes_set = std::bitset<YNN_MAX_TENSOR_RANK>;
31+
// dot packing splits + transposes 2 dimensions.
32+
constexpr size_t ynn_internal_extra_dims = 2;
33+
34+
using axes_set = std::bitset<YNN_MAX_TENSOR_RANK + ynn_internal_extra_dims>;
3235

3336
// Define a transpose node, optionally using a slinky copy that may alias even
3437
// if dimension 0 is not stride 1 in the result.

0 commit comments

Comments
 (0)