-
Notifications
You must be signed in to change notification settings - Fork 57
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
Implement rand* ops | feat(torchilb) #1035
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1035 +/- ##
==========================================
+ Coverage 77.91% 78.10% +0.19%
==========================================
Files 115 115
Lines 14706 14826 +120
Branches 1562 1574 +12
==========================================
+ Hits 11458 11580 +122
+ Misses 2877 2875 -2
Partials 371 371
|
Test Results 18 files ± 0 18 suites ±0 2h 11m 58s ⏱️ + 1h 2m 0s For more details on these failures, see this check. Results for commit 47b65f5. ± Comparison against base commit c74bc6a. This pull request removes 185 and adds 236 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
@@ -516,6 +516,152 @@ | |||
yield opinfo_core.SampleInput(make_arg(case), p=p, train=training) | |||
|
|||
|
|||
def sample_inputs_rand(op_info, device, dtype, requires_grad, **kwargs): |
Check warning
Code scanning / lintrunner
PYLINT/W0613 Warning test
See unused-argument. To disable, use # pylint: disable=unused-argument
yield opinfo_core.SampleInput(make_arg(shape), kwargs=dict(dtype=dtype)) | ||
|
||
|
||
def sample_inputs_rand_like(op_info, device, dtype, requires_grad, **kwargs): |
Check warning
Code scanning / lintrunner
PYLINT/W0613 Warning test
See unused-argument. To disable, use # pylint: disable=unused-argument
yield opinfo_core.SampleInput(make_arg(shape)) | ||
|
||
|
||
def sample_inputs_rand_like_dtype(op_info, device, dtype, requires_grad, **kwargs): |
Check warning
Code scanning / lintrunner
PYLINT/W0613 Warning test
See unused-argument. To disable, use # pylint: disable=unused-argument
yield opinfo_core.SampleInput(sample.input, low, high, *sample.args, **sample.kwargs) | ||
|
||
|
||
def sample_inputs_randn(op, device, dtype, requires_grad, **kwargs): |
Check warning
Code scanning / lintrunner
PYLINT/W0613 Warning test
See unused-argument. To disable, use # pylint: disable=unused-argument
yield opinfo_core.SampleInput(sample.input, low, high, *sample.args, **sample.kwargs) | ||
|
||
|
||
def sample_inputs_randn(op, device, dtype, requires_grad, **kwargs): |
Check warning
Code scanning / lintrunner
PYLINT/W0613 Warning test
See unused-argument. To disable, use # pylint: disable=unused-argument
Implement rand* ops. I split all ops that can take a dtype into two overloads to avoid trace_only logic.
Replaces #875