Skip to content

Conversation

@smessmer
Copy link
Contributor

@smessmer smessmer commented Sep 5, 2018

Stack:
    :white_circle:  #11167 Narrowing Blob  💛
    :white_circle:  #11238 Some improvements to IValue  💛
    :white_circle:  #11258 Improve Tensor() constructor  💛
    :white_circle:  #11260 Fix intrusive_ptr move/copy for different NullType's  💛
    :black_circle:  #11294 Remove manual refcounting from Tensor class  💛
    :white_circle:  #11352 Remove intrusive_ptr::reclaim() in Storage  💛
    :white_circle:  #11353 Simplify union payload copying  💛
    :white_circle:  #11355 Simplify IValue::toTensor()  💛
    :white_circle:  #11402 Simplify Blob move constructor/assignment  💛
    :white_circle:  #11414 IValue can store Blob  💛
    :white_circle:  #11481 Blob doesn't allow access to destroyCall anymore  💛

The Tensor(ptr, retain) constructor is error prone and circumvents the intrusive_ptr safety.

This diff removes that and pushes the responsibility to callers.
Step by step, manual refcounting can be pushed back and possibly eliminated in the end.

Differential Revision: D9663476

Differential Revision: D9663476
Differential Version: 56982467
@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Sep 5, 2018
wrapped_tensor = CodeTemplate(ALLOC_WRAP[ret['type']]).substitute(
env, arguments=[call])
return_tensor = "return Tensor((${wrapped_tensor})${maybe_scalar},false);"
return_tensor = "return Tensor(c10::intrusive_ptr<TensorImpl, UndefinedTensor>::reclaim((${wrapped_tensor})${maybe_scalar}));"

This comment was marked as off-topic.

Differential Revision: D9663476
Differential Version: 57101556
Differential Revision: D9663476
Differential Version: 57135226
Differential Revision: D9663476
Differential Version: 57214029
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 10, 2018
Summary:
Pull Request resolved: pytorch/pytorch#11294

The Tensor(ptr, retain) constructor is error prone and circumvents the intrusive_ptr safety.

This diff removes that and pushes the responsibility to callers.
Step by step, manual refcounting can be pushed back and possibly eliminated in the end.

Reviewed By: ezyang

Differential Revision: D9663476

fbshipit-source-id: 7f010e5e47b137a9575960201c5bf5d552c5c2f5
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
Summary:
Pull Request resolved: pytorch#11294

The Tensor(ptr, retain) constructor is error prone and circumvents the intrusive_ptr safety.

This diff removes that and pushes the responsibility to callers.
Step by step, manual refcounting can be pushed back and possibly eliminated in the end.

Reviewed By: ezyang

Differential Revision: D9663476

fbshipit-source-id: 7f010e5e47b137a9575960201c5bf5d552c5c2f5
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants