Skip to content

Conversation

@swolchok
Copy link
Contributor

@swolchok swolchok commented Sep 26, 2024

Stack from ghstack (oldest at bottom):

With the previous approach, we put the sizes, dim_order, and
strides vectors onto the heap, make_shared was forced to separately
allocate the control block for the TensorImpl because it used a custom
deleter, and then of course the TensorImpl itself is on the heap
(total of 5 allocations). Now, we combine the vectors (but not their
pointed-to data), deleter, control block, and TensorImpl into a single
allocation, saving 4 allocations.

Differential Revision: D63493196

With the previous approach, we put the sizes, dim_order, and
strides vectors onto the heap, make_shared was forced to separately
allocate the control block for the TensorImpl because it used a custom
deleter, and then of course the TensorImpl itself is on the heap
(total of 5 allocations). Now, we combine the vectors (but not their
pointed-to data), deleter, control block, and TensorImpl into a single
allocation, saving 4 allocations.

Differential Revision: [D63493196](https://our.internmc.facebook.com/intern/diff/D63493196/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 26, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5711

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

❌ 28 New Failures

As of commit 5d14295 with merge base d2ba238 (image):

NEW FAILURES - The following jobs have failed:

  • Build documentation / build (buck2) / Build doc (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-custom-ops-linux (buck2) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-custom-ops-linux (cmake) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (bf16, buck2, portable) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (bf16, cmake, portable) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, buck2, portable) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, buck2, xnnpack+custom) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, buck2, xnnpack+custom+qe) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, cmake, portable) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, cmake, xnnpack+custom) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-linux (fp32, cmake, xnnpack+custom+qe) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llama-runner-qnn-linux (fp32, cmake, qnn) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-llava-runner-linux / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (buck2, mv3, portable, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (buck2, mv3, xnnpack-quantization-delegation, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (cmake, mv3, portable, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (cmake, mv3, xnnpack-quantization-delegation, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (cmake, vit, portable, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-models-linux (cmake, vit, xnnpack-delegation, linux.2xlarge, 90) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-phi-3-mini-runner-linux / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-pybind-build-linux (cmake) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-quantized-aot-lib-linux (cmake) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-selective-build-linux (buck2) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-selective-build-linux (cmake) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / test-setup-linux-gcc (cmake) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: cannot bind non-const lvalue reference of type ‘torch::executor::Tensor&’ to an rvalue of type ‘executorch::aten::Tensor’ {aka ‘torch::executor::Tensor’}
  • pull / unittest / linux / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / unittest / macos / macos-job (gh)
    /Users/ec2-user/runner/_work/executorch/executorch/pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')
  • pull / unittest-arm (buck2) / linux-job (gh)
    /pytorch/executorch/extension/llm/custom_ops/../../../../executorch/extension/aten_util/make_aten_functor_from_et_functor.h:116:12: error: non-const lvalue reference to type 'torch::executor::Tensor' cannot bind to a temporary of type 'exec_aten::Tensor' (aka 'torch::executor::Tensor')

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

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63493196

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 26, 2024
swolchok added a commit that referenced this pull request Sep 26, 2024
With the previous approach, we put the sizes, dim_order, and
strides vectors onto the heap, make_shared was forced to separately
allocate the control block for the TensorImpl because it used a custom
deleter, and then of course the TensorImpl itself is on the heap
(total of 5 allocations). Now, we combine the vectors (but not their
pointed-to data), deleter, control block, and TensorImpl into a single
allocation, saving 4 allocations.

Differential Revision: [D63493196](https://our.internmc.facebook.com/intern/diff/D63493196/)

ghstack-source-id: 244960941
Pull Request resolved: #5711
…mplPtr"

With the previous approach, we put the sizes, dim_order, and
strides vectors onto the heap, make_shared was forced to separately
allocate the control block for the TensorImpl because it used a custom
deleter, and then of course the TensorImpl itself is on the heap
(total of 5 allocations). Now, we combine the vectors (but not their
pointed-to data), deleter, control block, and TensorImpl into a single
allocation, saving 4 allocations.

Differential Revision: [D63493196](https://our.internmc.facebook.com/intern/diff/D63493196/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63493196

swolchok added a commit that referenced this pull request Sep 26, 2024
Pull Request resolved: #5711

With the previous approach, we put the sizes, dim_order, and
strides vectors onto the heap, make_shared was forced to separately
allocate the control block for the TensorImpl because it used a custom
deleter, and then of course the TensorImpl itself is on the heap
(total of 5 allocations). Now, we combine the vectors (but not their
pointed-to data), deleter, control block, and TensorImpl into a single
allocation, saving 4 allocations.
ghstack-source-id: 244967824
@exported-using-ghexport

Differential Revision: [D63493196](https://our.internmc.facebook.com/intern/diff/D63493196/)
@swolchok swolchok closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants