pytorch/test
Richard Zou 71be5fe54e add support for {ones,zeros,full,rand,randn}_like ops (#28981)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28981

This PR adds support for calling those functions on named tensors. The
implementation is not the nicest: in the future we have plans to merge
names into TensorOptions, at which point we don't need the extra
branches that check if the tensor has names. Right now, however, these
functions are very useful to have (in particular, ones_like is used by
autograd to generate gradients).

Test Plan: - Added tests for each of these

Differential Revision: D18270937

Pulled By: zou3519

fbshipit-source-id: 720739ff0474449a960b81728345a4250becbfc3
2019-11-01 11:04:42 -07:00
..
backward_compatibility whitelist autogradanynonzero (#28852) 2019-10-29 17:00:27 -07:00
bottleneck
cpp Revert D18266918: C++ API: torch::nn::BatchNorm{2,3}d 2019-11-01 10:46:49 -07:00
cpp_api_parity Revert D18266918: C++ API: torch::nn::BatchNorm{2,3}d 2019-11-01 10:46:49 -07:00
cpp_extensions Delete ATenDispatch (#28468) 2019-10-24 22:15:00 -07:00
custom_operator Remove confusing torch::jit::RegisterOperators for custom ops (#28229) 2019-10-18 10:46:31 -07:00
data
error_messages
expect
jit fix handling of function attributes. (#28569) 2019-10-24 22:23:37 -07:00
onnx Return NotImplemented from all binary math ops (#27423) 2019-10-28 14:28:33 -07:00
optim
scripts Add scripts to run cuda-memcheck (#28127) 2019-10-29 12:05:29 -07:00
test_module
common_cuda.py
common_device_type.py Adds @overridePrecision decorator (#28131) 2019-10-16 19:47:55 -07:00
common_distributed.py
common_methods_invocations.py
common_nn.py Improve reshape backward when the op is a view (#28901) 2019-10-30 22:38:41 -07:00
common_quantization.py Don't permute in quantized::conv2d pattern (#27347) 2019-10-31 15:58:28 -07:00
common_quantized.py
common_utils.py Increase verbosity of Hypothesis on CI. (#28799) 2019-10-30 08:28:20 -07:00
dist_autograd_test.py Revert D18195584: Additional autograd unit tests for Python UDFs. 2019-11-01 06:59:54 -07:00
dist_utils.py Add enum type to rpc registry for consolidating RPC initialization code path (#28628) 2019-10-29 17:26:15 -07:00
expecttest.py
HowToWriteTestsUsingFileCheck.md
hypothesis_utils.py Refactor qconv_prepack and qconv_unpack to support conv3d (#28481) 2019-10-27 14:43:16 -07:00
jit_utils.py Switching tests to ProfilingExecutor (rebased) 2019-10-29 11:41:42 -07:00
rpc_test.py PyRRef.owner() to return WorkerInfo (#28909) 2019-10-31 17:11:24 -07:00
run_test.py Remove test_quantizer.py and reuse one of its test in test_quantization.py (#27269) 2019-10-29 19:04:21 -07:00
simulate_nccl_errors.py
test_autograd.py Remove autograd copy_ specific isFloatingPoint (#28279) 2019-10-29 12:25:39 -07:00
test_c10d.py Moving python allgather_coalesced impl from Py to C 2019-11-01 10:34:23 -07:00
test_c10d_spawn.py
test_cpp_api_parity.py
test_cpp_extensions.py Migrate remaining ops to the c10 dispatcher (#27978) 2019-10-24 11:40:57 -07:00
test_cuda.py
test_cuda_primary_ctx.py
test_data_parallel.py Split out data_parallel tests from test_nn.py into a separate (#28297) 2019-10-18 17:48:40 -07:00
test_dataloader.py
test_dist_autograd_fork.py
test_dist_autograd_spawn.py
test_distributed.py Moving python allgather_coalesced impl from Py to C 2019-11-01 10:34:23 -07:00
test_distributions.py
test_docs_coverage.py
test_expecttest.py
test_fake_quant.py Add the unittest import for test_fake_quant.py (#28815) 2019-10-28 17:52:57 -07:00
test_function_schema.py
test_indexing.py
test_jit.py Fix jit outplace tracing and reapply changes to *_like operators. (#28839) 2019-10-31 13:23:08 -07:00
test_jit_disabled.py
test_jit_fuser.py Switching tests to ProfilingExecutor (rebased) 2019-10-29 11:41:42 -07:00
test_jit_py3.py
test_jit_string.py
test_logging.py
test_mkldnn.py
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py add support for {ones,zeros,full,rand,randn}_like ops (#28981) 2019-11-01 11:04:42 -07:00
test_namedtuple_return_api.py Migrate return type void to () for native functions. (#28290) 2019-10-22 15:23:20 -07:00
test_nccl.py
test_nn.py Add C++ API clip_grad_value_ for nn:utils (#28736) 2019-10-31 19:11:54 -07:00
test_numba_integration.py
test_optim.py Add multiplicative lr. (#27254) 2019-10-23 11:38:45 -07:00
test_qat.py
test_quantization.py Don't permute in quantized::conv2d pattern (#27347) 2019-10-31 15:58:28 -07:00
test_quantized.py Add Conv3dInt8 (#28768) 2019-10-28 23:28:11 -07:00
test_quantized_models.py
test_quantized_nn_mods.py
test_quantized_tensor.py
test_rpc_fork.py
test_rpc_spawn.py
test_sparse.py
test_tensorboard.py
test_throughput_benchmark.py
test_torch.py Fix jit outplace tracing and reapply changes to *_like operators. (#28839) 2019-10-31 13:23:08 -07:00
test_type_hints.py
test_type_info.py
test_type_promotion.py Compute correct strides after type promotion (#28253) 2019-10-24 15:18:01 -07:00
test_utils.py Fix hub when branch name contains slash. (#27960) 2019-10-18 10:18:12 -07:00