-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Foreach clamp_min clamp_max #91384
Foreach clamp_min clamp_max #91384
Conversation
|
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/91384
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit f7b450f: NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@cpuhrsch With proliferation of foreach methods, worth adding TensorList (as accepted by foreach methods) as some sort of NestedTensor or a companion TensorList first-order structure? |
I'm not happy with the duplication of this piece:
Where can I put it so that I include it in the three .cu files? |
Just create a new header file if none of the existing headers seem appropriate? |
@ngimel ready for final review. In the process of fixing tests I added bool support to the regular clamp forward CUDA, and bool+float16 for CPU. Also expanded the nan/inf test to all foreach binary ops. windows and multiprocessing test failures unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @milesial let's see what CI says
Test failure looks unrelated |
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: The following mandatory check(s) failed (Rule Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
@ngimel merge failed :/ |
@pytorchbot merge -f "test failure flaky" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
@pytorchbot revert -m "Break internal build" -c ghfirst |
@pytorchbot successfully started a revert job. Check the current status here. |
Reverting PR 91384 failedReason: Command
Details for Dev Infra teamRaised by workflow job |
@pytorchbot revert -m "Break internal build" -c ghfirst |
@pytorchbot successfully started a revert job. Check the current status here. |
Reverting PR 91384 failedReason: Command
Details for Dev Infra teamRaised by workflow job |
Adds
_foreach_clamp_min
and_foreach_clamp_max
as binary ops, with scalar, scalarlist and tensorlist support.Timing example for
_foreach_clamp_min_
on a GTX3070Ti across a list of tensors with varying count and item size (times are in microseconds (us)):CUDA:
CPU:
Example use:
Does not support complex types.
Changes the existing
foreach_minimum/maximum
to use this new implementation.cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @Guobing-Chen @chunyuan-w @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire