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

Feature device synchronization #609

Merged

Conversation

kris-rowe
Copy link
Member

Description

Closes #598.

This could be split into 2 separate PRs: the first implementing stream::finish() and a subsequent one implementing device::finishAll(); however, the need for stream::finish is less clear outside of the current context.

@kris-rowe kris-rowe linked an issue Jul 25, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #609 (3f71526) into development (de6630f) will increase coverage by 0.00%.
The diff coverage is 33.33%.

❗ Current head 3f71526 differs from pull request most recent head 4d932ce. Consider uploading reports for the commit 4d932ce to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##           development     #609    +/-   ##
=============================================
  Coverage        77.26%   77.26%            
=============================================
  Files              261      258     -3     
  Lines            19554    19392   -162     
=============================================
- Hits             15109    14984   -125     
+ Misses            4445     4408    -37     
Impacted Files Coverage Δ
src/c/device.cpp 95.00% <0.00%> (-1.62%) ⬇️
src/c/stream.cpp 0.00% <0.00%> (ø)
src/core/device.cpp 90.03% <0.00%> (-1.09%) ⬇️
src/occa/internal/modes/serial/device.cpp 89.72% <ø> (-0.06%) ⬇️
src/occa/internal/core/device.cpp 72.46% <40.00%> (-2.54%) ⬇️
src/core/stream.cpp 67.24% <100.00%> (+1.16%) ⬆️
src/occa/internal/modes/serial/stream.cpp 100.00% <100.00%> (ø)
src/c/kernel_fortran_interface.cpp 0.00% <0.00%> (-10.00%) ⬇️
src/occa/internal/utils/store.hpp 90.62% <0.00%> (-6.25%) ⬇️
src/occa/internal/utils/string.hpp 92.98% <0.00%> (-4.72%) ⬇️
... and 17 more

@deukhyun-cha
Copy link
Contributor

Currently we have occaFinish()/occa::finish() as c/c++ API. If I didn't miss this doesn't seem include the exposure of stream::finish() and device::finishAll() to that end. I am wondering if/how it would come later. BTW this change would make the implementation (and API) much clear IMO.

@kris-rowe kris-rowe force-pushed the feature-device-synchronization branch from 71a79bf to cff8faa Compare July 28, 2022 16:32
@kris-rowe
Copy link
Member Author

Currently we have occaFinish()/occa::finish() as c/c++ API. If I didn't miss this doesn't seem include the exposure of stream::finish() and device::finishAll() to that end. I am wondering if/how it would come later.

Good catch. I was thinking to add this later, however I might as well do it now before it is merged so that it isn't forgotten.

@kris-rowe kris-rowe merged commit d30000b into libocca:development Jul 28, 2022
@kris-rowe kris-rowe deleted the feature-device-synchronization branch July 28, 2022 21:12
kris-rowe added a commit that referenced this pull request Aug 12, 2022
* Adds `finishAll` function to synchronize all streams on a device.
* Adds `stream::finish` to synchronize a specific stream.
* Adds C and Fortran interfaces for both
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

Successfully merging this pull request may close these issues.

Function to synchronize an entire device.
2 participants