Skip to content

Free MAGMA queues after use#11882

Closed
vishwakftw wants to merge 2 commits intopytorch:masterfrom
vishwakftw:magma_queue_obj
Closed

Free MAGMA queues after use#11882
vishwakftw wants to merge 2 commits intopytorch:masterfrom
vishwakftw:magma_queue_obj

Conversation

@vishwakftw
Copy link
Contributor

This PR is a minor change, just adds a simple magma_queue_destroy function to the implementation of Gesv.

Also, I have replaced calls for obtaining handles with those already written in ATen.

THCState_getCurrentSparseHandle(at::globalContext().getTHCState()) --> getCurrentCUDASparseHandle()
THCState_getCurrentBlasHandle(at::globalContext().getTHCState()) --> getCurrentCUDABlasHandle()

cc: @soumith @zou3519

}

static void destroyMagmaQueue(magma_queue_t& existing_queue) {
magma_queue_destroy(existing_queue);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@fmassa
Copy link
Member

fmassa commented Sep 25, 2018

I think this looks reasonable to me, but can anyone else have a look at this? cc @soumith

@soumith
Copy link
Collaborator

soumith commented Sep 25, 2018

fixed some merge conflicts, will wait for CI to finish

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

soumith has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Sep 25, 2018
Summary:
This PR is a minor change, just adds a simple `magma_queue_destroy` function to the implementation of `Gesv`.

Also, I have replaced calls for obtaining handles with those already written in ATen.
```
THCState_getCurrentSparseHandle(at::globalContext().getTHCState()) --> getCurrentCUDASparseHandle()
THCState_getCurrentBlasHandle(at::globalContext().getTHCState()) --> getCurrentCUDABlasHandle()
```

Differential Revision: D10032204

Pulled By: soumith

fbshipit-source-id: ccd11989ecdc357313f0b661a2468f75d3aecb0e
@vishwakftw vishwakftw closed this Sep 26, 2018
@vishwakftw vishwakftw deleted the magma_queue_obj branch September 26, 2018 05:49
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.

5 participants