-
Notifications
You must be signed in to change notification settings - Fork 83
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
multi gpu example #304
base: main
Are you sure you want to change the base?
multi gpu example #304
Conversation
amwi04
commented
Dec 16, 2024
- GPU will perform vector_add
- GPU will perform vector_substract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Amod! I left some comments.
dev0.set_current() | ||
stream0 = dev0.create_stream() | ||
|
||
# allocate memory to GPU0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# allocate memory to GPU0 | |
# Allocate memory to GPU0 | |
# Note: This runs on CuPy's current stream |
dev1.set_current() | ||
stream1 = dev1.create_stream() | ||
|
||
# allocate memory to GPU1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# allocate memory to GPU1 | |
# Allocate memory to GPU1 | |
# Note: This runs on CuPy's current stream |