Skip to content

Ensure GIL is held in ObjectPtrAllocators#2581

Merged
soumith merged 1 commit intomasterfrom
allocator_gil
Sep 1, 2017
Merged

Ensure GIL is held in ObjectPtrAllocators#2581
soumith merged 1 commit intomasterfrom
allocator_gil

Conversation

@apaszke
Copy link
Copy Markdown
Contributor

@apaszke apaszke commented Aug 30, 2017

Also, make Storages that share data with numpy arrays non-resizable.

Fixes #2348.

@soumith
Copy link
Copy Markdown
Collaborator

soumith commented Aug 30, 2017

contbuilds fail with:

linux/builder/pytorch/torch/csrc/generic/TensorMethods.cpp:292:44: error: ‘THCudaHalfStorage {aka struct THCudaHalfStorage}’ has no member named ‘flags’
00:01:31.552          THPUtils_assert(arg_self->storage->flags & TH_STORAGE_RESIZABLE, "calling resize_ on a tensor that has non-resizable storage. Clone it first " "or create a new tensor instead.");
00:01:31.552                                             ^
00:01:31.552 /home/jenkins/buildbot/workspace/pytorch-PR-py2-linux/builder/pytorch/torch/csrc/utils.h:112:24: note: in definition of macro ‘THPUtils_assertRet’
00:01:31.552  if (__builtin_expect(!(cond), 0)) { THPUtils_setError(__VA_ARGS__); return value; }
00:01:31.552                         ^
00:01:31.552 /home/jenkins/buildbot/workspace/pytorch-PR-py2-linux/builder/pytorch/torch/csrc/generic/TensorMethods.cpp:292:9: note: in expansion of macro ‘THPUtils_assert’
00:01:31.552          THPUtils_assert(arg_self->storage->flags & TH_STORAGE_RESIZABLE, "calling resize_ on a tensor that has non-resizable storage. Clone it first " "or create a new tensor instead.");

@soumith soumith merged commit 9f685e4 into master Sep 1, 2017
@soumith soumith deleted the allocator_gil branch September 14, 2017 13:33
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Aug 2, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results here

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

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.

Segfault when using together with Pandas

3 participants