pytorch/test
Meghan Lele 56832bf7f3 [JIT] Add support for tolist for GPU-resident Tensors (#34554)
Summary:
**Summary**
This commit modifies the JIT implementation of `Tensor.tolist` so that it
can be called on GPU-resident Tensors as well. If the Tensors is not on the
CPU when the operator is invoked, it is copied to the CPU before doing any
of the rest of the work to convert it into a list.

**Testing**
This commit adds GPU versions of some of the existing CPU tests for this
feature.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34554

Differential Revision: D20392604

Pulled By: SplitInfinity

fbshipit-source-id: 69c17b98d866428c19d683588046169538aaf1e3
2020-03-11 15:14:12 -07:00
..
backward_compatibility [PyTorch BC] Clean up the BC whitelist (#34393) 2020-03-06 16:10:20 -08:00
bottleneck_test fix possible pandas import error during tensorboard tests (#29650) 2020-02-04 14:27:46 -08:00
cpp Revert D20282846: Delete OperatorOptions, absorb AliasAnalysisKind into FunctionSchema. 2020-03-11 07:50:29 -07:00
cpp_api_parity [C++ API] Add PackedSequence / pack_padded_sequence / pad_packed_sequence / pack_sequence (#33652) 2020-02-25 12:53:41 -08:00
cpp_extensions Delete unnecessary aliasAnalysis specification from operator registrations. (#33093) 2020-02-21 14:24:44 -08:00
custom_operator Separate torchbind from Python (#30242) 2019-12-21 22:52:40 -08:00
distributed fix handling of replica parameters in DataParallel (#33907) 2020-03-10 10:35:44 -07:00
error_messages
expect Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
jit [JIT] Add support for tolist for GPU-resident Tensors (#34554) 2020-03-11 15:14:12 -07:00
mobile [pytorch] remove boilerplate setQEngine() from PyTorch mobile predictors (#34556) 2020-03-11 00:55:14 -07:00
onnx [ONNX] Support one_hot (#34454) 2020-03-09 22:26:36 -07:00
optim
scripts Make test_torch.py pass cuda-memcheck (#29243) 2019-12-14 20:29:58 -08:00
HowToWriteTestsUsingFileCheck.md
run_test.py [pytorch_ci] Skip determination tests in rocm 2020-03-05 11:23:02 -08:00
simulate_nccl_errors.py
test_autograd.py Avoid clone for sparse tensors during accumulation of grads. (#33427) 2020-03-10 12:41:47 -07:00
test_complex.py Added tensor.is_complex(), is_complex and dtype.is_complex py binding, tensor printing, and dixed the scalar type returned for complex float (#33268) 2020-02-20 13:38:01 -08:00
test_cpp_api_parity.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_cpp_extensions_aot.py [ROCm] Added support for pytorch extensions to use HIP (#32669) 2020-02-21 12:10:02 -08:00
test_cpp_extensions_jit.py Add pybind11 exception translator (#30588) 2020-02-18 11:33:29 -08:00
test_cuda.py Expose CUDACachingAllocator raw_alloc and raw_delete to python (#33860) 2020-03-03 17:50:11 -08:00
test_cuda_primary_ctx.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_dataloader.py Fix all occurrences of C416. (#33429) 2020-02-21 08:32:22 -08:00
test_determination.py [pytorch_ci] Python target determinator (#33577) 2020-03-03 18:01:12 -08:00
test_distributions.py Feature/vonmises upstream (#33418) 2020-02-26 08:19:12 -08:00
test_docs_coverage.py [doc] Add grad context manager doc to toplevel torch module. (#33877) 2020-03-02 06:32:36 -08:00
test_expecttest.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_fake_quant.py Per channel quantization performance improvement (#33772) 2020-02-26 10:19:25 -08:00
test_function_schema.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_indexing.py Fix index_put when tensor length > int_max (#33753) 2020-03-01 21:51:23 -08:00
test_jit.py [JIT] Torchbind error if python instantiate class that doesnt exist (#34568) 2020-03-11 13:13:08 -07:00
test_jit_disabled.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_jit_fuser.py Check fuser results when profiling (#33944) 2020-02-28 17:01:34 -08:00
test_jit_fuser_legacy.py
test_jit_legacy.py
test_jit_py3.py [jit] Resolve type annotation names to types (#29623) 2020-02-28 18:35:10 -08:00
test_jit_simple.py
test_jit_string.py [PyTorch][TorchScript] Add support for join on List of strings in TorchScript (#32847) 2020-01-31 18:20:38 -08:00
test_logging.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_mkldnn.py Fix MKLDNN conv2d 5d weight handling (#34115) 2020-03-04 11:26:38 -08:00
test_multiprocessing.py Better handing of Autograd+Fork errors. (#33885) 2020-02-27 16:07:29 -08:00
test_multiprocessing_spawn.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_namedtensor.py Adds true_divide function, analogous to Python 's, JAX's, NumPy's (true) division (#34236) 2020-03-09 21:06:33 -07:00
test_namedtuple_return_api.py Added cummin 2020-01-17 10:51:58 -08:00
test_nn.py [ROCm] Enable BFloat16 type for loss functions and few misc ops required for resnet50 (#34469) 2020-03-10 08:39:07 -07:00
test_numba_integration.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_optim.py convert counter back to list #33229 (#33356) 2020-03-10 15:46:24 -07:00
test_overrides.py Revert D20193196: [pytorch][PR] PCA and SVD for low-rank matrices, LOBPCG for positive-defined generalized eigenvalue problem 2020-03-11 09:24:34 -07:00
test_qat.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_quantization.py [quantization] Make FP16 RNN use new prepack op (#34339) 2020-03-07 10:04:01 -08:00
test_quantized.py add quantized_hardtanh (#34097) 2020-03-10 22:27:15 -07:00
test_quantized_models.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_quantized_nn_mods.py [quant] Add Quantized BatchNorm2d module (#33109) 2020-02-13 12:15:43 -08:00
test_quantized_tensor.py Preserve Backward compatibility of models serialized before #31040 (#33796) 2020-02-26 13:40:38 -08:00
test_serialization.py Avoid problematic pickle usages on Python 3.8.0 and 3.8.1 (#33824) 2020-02-26 21:15:38 -08:00
test_sparse.py Turn on exact_dtype by default on test_sparse.py (#34489) (#34542) 2020-03-10 12:52:09 -07:00
test_tensorboard.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_throughput_benchmark.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_torch.py Revert D20193196: [pytorch][PR] PCA and SVD for low-rank matrices, LOBPCG for positive-defined generalized eigenvalue problem 2020-03-11 09:24:34 -07:00
test_type_hints.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_type_info.py Move pytorch distributed tests to separate folder for contbuild. (#30445) 2020-01-22 21:16:59 -08:00
test_type_promotion.py Adds true_divide function, analogous to Python 's, JAX's, NumPy's (true) division (#34236) 2020-03-09 21:06:33 -07:00
test_utils.py Consider hub_dir alongside TORCH_HOME env variable for storing hub models (#32844) 2020-02-05 15:35:53 -08:00