FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Free unlocked buffers before tests run in rng quality tests by 9prady9 · Pull Request #3151 · arrayfire/arrayfire · GitHub

Repository navigation

Free unlocked buffers before tests run in rng quality tests - #3151

Merged
9prady9 merged 2 commits into
arrayfire:masterfrom
9prady9:fix_rng_quality_tests
Jun 22, 2021
Merged

9prady9 merged 2 commits into
arrayfire:masterfrom
9prady9:fix_rng_quality_tests

Conversation

9prady9 commented Jun 22, 2021

Copy link
Copy Markdown
Member

Description

This is needed when running rng quality tests on lesser memory cards
where higher memory usage is causing out of memory issues.

Changes to Users

None

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

This is needed when running rng quality tests on lesser memory cards
where higher memory usage is causing out of memory issues.
9prady9 added this to the 3.8.1 milestone Jun 22, 2021
9prady9 requested a review from umar456 June 22, 2021 09:40
Comment thread test/rng_quality.cpp
virtual void SetUp() {
//Ensure all unlocked buffers are freed
// Ensure all unlocked buffers are freed
deviceGC();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If you want to unlock all buffers, you need to add af::sync() before the deviceGC().
Without the sync, the buffers which are still in use by executing kernels will not be freed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That is not the case with deviceGC in this location. When test finishes, all arrays involved are already evaluated because they need to be brought to host for comparison. So, they will be marked as unused by the time this line hits before the next test starts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Additionally all allocation and free function are device synchronization events.

9prady9 merged commit bde5bd2 into arrayfire:master Jun 22, 2021
9prady9 deleted the fix_rng_quality_tests branch June 22, 2021 15:10
9prady9 added a commit to 9prady9/arrayfire that referenced this pull request Aug 2, 2021
…e#3151)

* Free unlocked buffers before tests run in rng quality tests

This is needed when running rng quality tests on lesser memory cards
where higher memory usage is causing out of memory issues.

* Fix formatting

(cherry picked from commit bde5bd2)
syurkevi pushed a commit that referenced this pull request Dec 28, 2021
* Free unlocked buffers before tests run in rng quality tests

This is needed when running rng quality tests on lesser memory cards
where higher memory usage is causing out of memory issues.

* Fix formatting

(cherry picked from commit bde5bd2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL