Skip to content

flatten_indices: remove syncs#94401

Closed
nikitaved wants to merge 20 commits intogh/nikitaved/17/basefrom
gh/nikitaved/17/head
Closed

flatten_indices: remove syncs#94401
nikitaved wants to merge 20 commits intogh/nikitaved/17/basefrom
gh/nikitaved/17/head

Conversation

@nikitaved
Copy link
Copy Markdown
Collaborator

@nikitaved nikitaved commented Feb 8, 2023

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Feb 8, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 07d182b:
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the release notes: sparse release notes category label Feb 8, 2023
@nikitaved nikitaved added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 9, 2023
Copy link
Copy Markdown
Collaborator

@pearu pearu left a comment

Choose a reason for hiding this comment

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

LGMT! Thanks, @nikitaved!

// NOTE: capture by value required by CUDA
[=] FUNCAPI (int64_t nnz_idx) -> int64_t {
const auto* RESTRICT ptr_indices_dim = ptr_indices + nnz_idx * indices_nnz_stride;
auto hash = static_cast<int64_t>(0);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
auto hash = static_cast<int64_t>(0);
int64_t hash = 0;

@nikitaved
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 12, 2023
@malfet
Copy link
Copy Markdown
Contributor

malfet commented Mar 13, 2023

This causes internal link failures, trying to investigate:

stderr: ld.lld: error: undefined symbol: at::native::DispatchStub<at::Tensor (*)(at::Tensor const&, c10::ArrayRef<long long>), at::native::flatten_indices_stub>::DEFAULT
>>> referenced by DispatchStub.h:137 (buck-out/gen/fe3a39b8/xplat/caffe2/aten_headerAndroid#header-mode-symlink-tree-with-header-map,headers/ATen/native/DispatchStub.h:137)
>>>               buck-out/gen/fe3a39b8/xplat/caffe2/aten_cpuAndroid#android-x86,compile-pic-SparseTensorUtils.cpp.oeb82483d/aten/src/ATen/SparseTensorUtils.cpp.o:(at::sparse::flatten_indices(at::Tensor const&, c10::ArrayRef<long long>, bool))
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Some explanation: DECLARE_DISPATCH is design with performance in mind, i.e. calling a stub result in direct, rather than indirect function call, which result in a linker error if aten_core and aten_native are 2 different targets, which they are if one to look into

pytorch/buckbuild.bzl

Lines 1916 to 1925 in b992199

("aten_cpu", jit_core_sources + aten_cpu_source_list + [
# Generated
":gen_aten[Functions.cpp]",
":gen_aten[Operators_0.cpp]",
":gen_aten[Operators_1.cpp]",
":gen_aten[Operators_2.cpp]",
":gen_aten[Operators_3.cpp]",
":gen_aten[Operators_4.cpp]",
":gen_aten[core/ATenOpList.cpp]",
":gen_aten[core/TensorMethods.cpp]",

malfet added a commit that referenced this pull request Mar 13, 2023
pytorchmergebot pushed a commit that referenced this pull request Mar 14, 2023
To expose errors similar to #94401 (comment) in OSS CI

Building `aten_cpu` as a shared library with `-Wl,--no-undefined` simulates behavior of Android NDK toolchain.

Test plan: It should fail, see https://github.com/pytorch/pytorch/actions/runs/4410571970/jobs/7728232916#step:14:1386

Pull Request resolved: #96697
Approved by: https://github.com/kit1980
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 14, 2023
malfet added a commit that referenced this pull request Mar 14, 2023
pytorchmergebot pushed a commit that referenced this pull request Mar 14, 2023
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 23, 2023
To expose errors similar to pytorch/pytorch#94401 (comment) in OSS CI

Building `aten_cpu` as a shared library with `-Wl,--no-undefined` simulates behavior of Android NDK toolchain.

Test plan: It should fail, see https://github.com/pytorch/pytorch/actions/runs/4410571970/jobs/7728232916#step:14:1386

Pull Request resolved: pytorch/pytorch#96697
Approved by: https://github.com/kit1980
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 23, 2023
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 27, 2023
To expose errors similar to pytorch/pytorch#94401 (comment) in OSS CI

Building `aten_cpu` as a shared library with `-Wl,--no-undefined` simulates behavior of Android NDK toolchain.

Test plan: It should fail, see https://github.com/pytorch/pytorch/actions/runs/4410571970/jobs/7728232916#step:14:1386

Pull Request resolved: pytorch/pytorch#96697
Approved by: https://github.com/kit1980
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 27, 2023
@facebook-github-bot facebook-github-bot deleted the gh/nikitaved/17/head branch June 8, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: sparse release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants