8000 Support remaining *_like factory functions for NJT by jbschlosser · Pull Request #144889 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Support remaining *_like factory functions for NJT #144889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from

Conversation

jbschlosser
Copy link
Contributor
@jbschlosser jbschlosser commented Jan 15, 2025

Stack from ghstack (oldest at bottom):

Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:

  • full_like()
  • rand_like()
  • randint_like()

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer offsets / lengths to the new device.

Copy link
pytorch-bot bot commented Jan 15, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 21dfa57 with merge base 5d01a28 (image):
💚 Looks good so far! There are no failures yet. 💚

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

Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 17, 2025
ghstack-source-id: 1f8ad3e
Pull Request resolved: #144889
Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 17, 2025
ghstack-source-id: 02b9c8b
Pull Request resolved: #144889
Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 17, 2025
ghstack-source-id: 46686b0
Pull Request resolved: #144889
Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 17, 2025
ghstack-source-id: b8bcd75
Pull Request resolved: #144889
Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 21, 2025
ghstack-source-id: 8b6c82a
Pull Request resolved: #144889
Copy link
Contributor
@soulitzer soulitzer left a comment

Choose a reason for hiding this comment

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

Cool!

Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 24, 2025
ghstack-source-id: a407a93
Pull Request resolved: #144889
@jbschlosser
8000 Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 24, 2025
@pytorchmergebot
Copy link
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

@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 24, 2025 17:53 Inactive
@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 24, 2025 17:53 Inactive
@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 24, 2025 17:53 Inactive
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@jbschlosser
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

@jbschlosser
Copy link
Contributor Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 17 checks: pull / linux-focal-py3.13-clang10 / test (default, 4, 5, lf.linux.4xlarge), pull / linux-focal-py3.13-clang10 / test (default, 5, 5, lf.linux.4xlarge), pull / linux-jammy-py3.9-gcc11 / test (default, 1, 5, lf.linux.2xlarge), pull / linux-jammy-py3.9-gcc11 / test (default, 4, 5, lf.linux.2xlarge), pull / linux-focal-py3.9-clang10 / test (default, 3, 5, lf.linux.4xlarge), pull / linux-focal-py3.9-clang10 / test (default, 4, 5, lf.linux.4xlarge), pull / linux-focal-py3.9-clang10 / test (dynamo_wrapped, 1, 3, lf.linux.2xlarge), pull / linux-focal-py3.9-clang10 / test (dynamo_wrapped, 3, 3, lf.linux.2xlarge), pull / linux-jammy-py3.10-clang15-asan / test (default, 3, 6, lf.linux.4xlarge), pull / linux-jammy-py3.10-clang15-asan / test (default, 5, 6, lf.linux.4xlarge), pull / linux-jammy-py3.10-clang15-asan / test (default, 6, 6, lf.linux.4xlarge), pull / linux-focal-cuda12.4-py3.10-gcc9 / test (default, 1, 5, lf.linux.4xlarge.nvidia.gpu), pull / linux-focal-cuda12.4-py3.10-gcc9 / test (default, 5, 5, lf.linux.4xlarge.nvidia.gpu), pull / linux-focal-cuda12.4-py3.10-gcc9-sm89 / test (default, 2, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu), pull / linux-focal-cuda12.4-py3.10-gcc9-sm89 / test (default, 4, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu), trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable)

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

Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Jan 27, 2025
ghstack-source-id: 8788794
Pull Request resolved: #144889
@jbschlosser
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 27, 2025 19:04 Inactive
@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 27, 2025 19:04 Inactive
@pytorch-bot pytorch-bot bot temporarily deployed to upload-benchmark-results January 27, 2025 19:04 Inactive
nWEIdia pushed a commit to nWEIdia/pytorch that referenced this pull request Jan 27, 2025
Fixes pytorch#144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.
Pull Request resolved: pytorch#144889
Approved by: https://github.com/soulitzer
@github-actions github-actions bot deleted the gh/jbschlosser/224/head branch February 28, 2025 02:11
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 release notes: nested tensor Changes that have a direct impact on nested tensors topic: improvements topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0