Skip to content

Commit

Permalink
fix: use_block_sparse_edges does not set to False when only 1 ProdN…
Browse files Browse the repository at this point in the history
…odes in a ProdLayer
  • Loading branch information
liuanji committed Jan 2, 2024
1 parent 198c985 commit a89020c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyjuice/layer/prod_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def __init__(self, nodes: Sequence[ProdNodes], global_nid_start: Optional[int] =
assert len(nodes) > 0, "No input node."

use_block_sparse_edges = True
for nid in range(1, len(nodes)):
if nodes[0].group_size != nodes[nid].group_size or nodes[nid].is_sparse():
for nid in range(0, len(nodes)):
if nodes[nid].is_sparse() or nodes[0].group_size != nodes[nid].group_size:
use_block_sparse_edges = False
break
self.use_block_sparse_edges = use_block_sparse_edges
Expand Down

0 comments on commit a89020c

Please sign in to comment.