Skip to content

Commit 2c7552d

Browse files
committed
Fix thread indexing in contract_blocks! to account for interactive nthreads
1 parent a8ef3d1 commit 2c7552d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NDTensors/src/blocksparse/contract_threads.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function contract_blocks!(
1919
@spawn for block1 in blocks1_partition
2020
for block2 in blocks2
2121
maybe_contract_blocks!(
22-
contraction_plans[threadid()],
22+
contraction_plans[threadid() - nthreads(:interactive)],
2323
block1,
2424
block2,
2525
labels1_to_labels2,
@@ -36,7 +36,7 @@ function contract_blocks!(
3636
@spawn for block2 in blocks2_partition
3737
for block1 in blocks1
3838
maybe_contract_blocks!(
39-
contraction_plans[threadid()],
39+
contraction_plans[threadid() - nthreads(:interactive)],
4040
block1,
4141
block2,
4242
labels1_to_labels2,

0 commit comments

Comments
 (0)