Skip to content

Conversation

Emmanuel-R8
Copy link

No description provided.

Comment on lines +282 to +285
@tullio D[i, j] := begin
TMP[i, j, m, n] = A[i, j, k, l] * B[k, l, m, n]
TMP[i, j, m, n] * C[m, n]
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this one is safe, but I'm not keen to encourage such use. Tullio will often multi-thread over indices it deems safe, but it is not smart enough to notice that this is writing into an array. If it had TMP[j, m, n] = , this would introduce data races.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think I should had a comment to that effect. It is another difference with single liners.

Copy link
Author

@Emmanuel-R8 Emmanuel-R8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add text about data races when using the same symbol within a block.

@mcabbott mcabbott added the documentation Improvements or additions to documentation label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants