Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't some operations run in parallel? #535

Open
ita9naiwa opened this issue Sep 23, 2023 · 1 comment
Open

Can't some operations run in parallel? #535

ita9naiwa opened this issue Sep 23, 2023 · 1 comment

Comments

@ita9naiwa
Copy link
Contributor

Hi. I see that some operations like tensor addition are implemented with threads.

but I see that very similar operations like subtraction and division are run with single threads.

is it intended or it has some reasons behind the implementations of such operations?

@ita9naiwa ita9naiwa changed the title cant' Some operations run in parallel? Can't some operations run in parallel? Sep 23, 2023
@cmp-nct
Copy link

cmp-nct commented Oct 4, 2023

The bottleneck for simple operation is memory bandwidth, more threads would likely reduce performance on them.
At least I assume that's the reason. An addition or subtraction is a very fast computation, getting a large tensor from memory and writing it again is a slow operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants