Skip to content

Conversation

@vedanuj
Copy link
Contributor

@vedanuj vedanuj commented Mar 17, 2018

Fixes segfault in #5821 . Releasing the Global Interpreter Lock after maybe_initialize_cuda.

Test ::

In [3]: data = np.array([1.0])

In [4]: torch.tensor(data, dtype=torch.float32)
Out[4]:
 1
[torch.FloatTensor of size (1,)]

In [5]: torch.tensor(data, dtype=torch.cuda.float32)
Out[5]:

 1
[torch.cuda.FloatTensor of size (1,) (GPU 0)]

Please review @colesbury @gchanan

@soumith soumith merged commit d441396 into pytorch:master Mar 17, 2018
@soumith
Copy link
Contributor

soumith commented Mar 17, 2018

lgtm, thanks vedanuj!

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.

2 participants