/aosp_15_r20/external/pytorch/test/dynamo/ |
H A D | test_deviceguard.py | 25 device_guard = DeviceGuard(self.device_interface, 1) 27 with device_guard as _: 29 self.assertEqual(device_guard.prev_idx, 0) 30 self.assertEqual(device_guard.idx, 1) 33 self.assertEqual(device_guard.prev_idx, 0) 34 self.assertEqual(device_guard.idx, 1) 37 device_guard = DeviceGuard(self.device_interface, None) 39 with device_guard as _: 41 self.assertEqual(device_guard.prev_idx, -1) 42 self.assertEqual(device_guard.idx, None) [all …]
|
/aosp_15_r20/external/pytorch/aten/src/ATen/test/ |
H A D | cuda_stream_test.cpp | 136 at::cuda::CUDAGuard device_guard(1); in TEST() local 207 at::cuda::CUDAGuard device_guard{1}; in TEST() local 303 at::cuda::CUDAGuard device_guard(0); in TEST() local 330 at::cuda::CUDAGuard device_guard(0); in TEST() local 334 at::cuda::CUDAGuard device_guard(1); in TEST() local 356 at::cuda::CUDAGuard device_guard(0); in TEST() local 398 at::cuda::CUDAGuard device_guard(0); in TEST() local 414 at::cuda::CUDAGuard device_guard(0); in TEST() local 422 at::cuda::CUDAGuard device_guard(0); in TEST() local
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/ |
H A D | native_functions.yaml | 939 device_guard: False 946 device_guard: False 1362 device_guard: False 1459 device_guard: False 1464 device_guard: False 1634 device_guard: False 1760 device_guard: False 1964 device_guard: False 1995 device_guard: False 2082 device_guard: False [all …]
|
/aosp_15_r20/external/pytorch/torchgen/dest/ |
H A D | register_dispatch_key.py | 497 if self.backend_index.device_guard: 505 device_guard = "// DeviceGuard omitted" # default 506 if f.device_guard and self.backend_index.device_guard: 513 device_guard = """ 514 const DeviceGuard device_guard(device_or_default(device));""" 518 device_guard = ( 519 f"globalContext().lazyInitCUDA();\n{device_guard}" 547 … device_guard = f"const OptionalDeviceGuard device_guard(device_of({device_of}));" 555 {device_guard} 840 if self.backend_index.device_guard:
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/cuda/ |
H A D | Copy.cu | 188 CUDAGuard device_guard(src_device); in copy_device_to_device() local 204 device_guard.set_device(dst_device); in copy_device_to_device() 207 device_guard.set_device(src_device); in copy_device_to_device() 250 device_guard.set_device(dst_device); in copy_device_to_device() 345 cuda::OptionalCUDAGuard device_guard; in copy_kernel_cuda() local 348 device_guard.set_device(dst_device); in copy_kernel_cuda() 351 device_guard.set_device(src_device); in copy_kernel_cuda()
|
H A D | Loops.cuh | 185 const OptionalDeviceGuard device_guard(iter.device(1)); in opmath_gpu_kernel_with_scalars() local 210 OptionalDeviceGuard device_guard; in opmath_symmetric_gpu_kernel_with_scalars() local 222 device_guard.reset_device(iter.device(1)); in opmath_symmetric_gpu_kernel_with_scalars()
|
/aosp_15_r20/external/pytorch/docs/cpp/source/notes/ |
H A D | tensor_cuda_stream.rst | 149 at::cuda::CUDAGuard device_guard{1}; 156 // current device is reset to device 0 after device_guard is destroyed 237 at::cuda::CUDAGuard device_guard(1); 241 // device index is reset to 0 after device_guard is destroyed 249 at::cuda::CUDAGuard device_guard(1); 254 // current device index is reset to 0 after `device_guard` is destroyed
|
/aosp_15_r20/external/pytorch/torch/csrc/cuda/ |
H A D | nccl.cpp | 588 at::cuda::OptionalCUDAGuard device_guard; in broadcast() local 591 device_guard.set_index(device); in broadcast() 640 at::cuda::OptionalCUDAGuard device_guard; in reduce() local 643 device_guard.set_index(device); in reduce() 694 at::cuda::OptionalCUDAGuard device_guard; in all_reduce() local 697 device_guard.set_index(device); in all_reduce() 736 at::cuda::OptionalCUDAGuard device_guard; in reduce_scatter() local 739 device_guard.set_index(device); in reduce_scatter() 777 at::cuda::OptionalCUDAGuard device_guard; in all_gather() local 780 device_guard.set_index(device); in all_gather()
|
H A D | comm.cpp | 182 at::cuda::CUDAGuard device_guard(static_cast<DeviceIndex>(devices[0])); in _broadcast_out_impl() local 193 device_guard.set_index(static_cast<DeviceIndex>(devices[i])); in _broadcast_out_impl() 207 device_guard.set_index(static_cast<DeviceIndex>(devices[i])); in _broadcast_out_impl()
|
/aosp_15_r20/external/pytorch/torch/csrc/distributed/c10d/quantization/ |
H A D | quantization_gpu.cu | 60 at::cuda::OptionalCUDAGuard device_guard; in _float_to_bfloat16_cuda() local 61 device_guard.set_index(input.get_device()); in _float_to_bfloat16_cuda() 111 at::cuda::OptionalCUDAGuard device_guard; in _bfloat16_to_float_cuda() local 112 device_guard.set_index(input.get_device()); in _bfloat16_to_float_cuda()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/quantized/cuda/ |
H A D | FusedObsFakeQuant.cu | 140 at::cuda::OptionalCUDAGuard device_guard; in _calculate_moving_average() local 141 device_guard.set_index(x.get_device()); in _calculate_moving_average() 196 at::cuda::OptionalCUDAGuard device_guard; in _calc_moving_avg_qparams_helper() local 197 device_guard.set_index(x.get_device()); in _calc_moving_avg_qparams_helper()
|
H A D | EmbeddingBag.cu | 214 at::cuda::OptionalCUDAGuard device_guard; in embedding_bag_byte_impl() local 215 device_guard.set_index(weight.get_device()); in embedding_bag_byte_impl() 396 at::cuda::OptionalCUDAGuard device_guard; in embedding_bag_4bit_impl() local 397 device_guard.set_index(weight.get_device()); in embedding_bag_4bit_impl()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/ |
H A D | TensorIndexing.cpp | 69 OptionalDeviceGuard device_guard(device_of(*this)); in index() local 78 OptionalDeviceGuard device_guard(device_of(*this)); in index_put_() local 84 OptionalDeviceGuard device_guard(device_of(*this)); in index_put_() local
|
/aosp_15_r20/external/pytorch/tools/autograd/templates/ |
H A D | python_variable_methods.cpp | 250 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_contiguous() local 294 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_copy_() local 320 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_to() local 383 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_invert() local 448 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_nonzero() local 454 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_nonzero_numpy() local 953 OptionalDeviceGuard device_guard(device_of(self_)); in THPVariable_new() local 965 OptionalDeviceGuard device_guard(device_of(self_)); in THPVariable_new_tensor() local
|
/aosp_15_r20/external/pytorch/torchgen/ |
H A D | model.py | 492 device_guard: bool 640 device_guard = e.pop("device_guard", True) 641 assert isinstance(device_guard, bool), f"not a bool: {device_guard}" 940 device_guard=device_guard, 988 self.device_guard 989 ), "device_guard: False is not respected by structured kernels" 996 self.device_guard 997 ), "device_guard: False is not respected by structured kernels" 1276 device_guard: bool
|
H A D | gen_backend_stubs.py | 83 use_device_guard = yaml_values.pop("device_guard", False) 86 ), f"You must provide either True or False for device_guard. Provided: {use_device_guard}" 150 device_guard=use_device_guard,
|
/aosp_15_r20/external/pytorch/tools/test/ |
H A D | test_gen_backend_stubs.py | 270 # if device_guard is provided, it must be a bool 275 device_guard: frue 281 """You must provide either True or False for device_guard. Provided: frue""",
|
/aosp_15_r20/external/pytorch/torch/csrc/utils/ |
H A D | tensor_new.cpp | 647 at::OptionalDeviceGuard device_guard(deviceOptional); in legacy_sparse_tensor_generic_ctor_new() local 659 at::OptionalDeviceGuard device_guard(deviceOptional); in legacy_sparse_tensor_generic_ctor_new() local 740 at::OptionalDeviceGuard device_guard(deviceOptional); in legacy_tensor_generic_ctor_new() local 955 at::OptionalDeviceGuard device_guard(r.deviceOptional(ARG_DEVICE)); in sparse_compressed_tensor_ctor_worker() local 1010 at::OptionalDeviceGuard device_guard(r.deviceOptional(ARG_DEVICE1)); in sparse_compressed_tensor_ctor_worker() local 1182 at::OptionalDeviceGuard device_guard(r.deviceOptional(ARG_DEVICE)); in sparse_coo_tensor_ctor() local 1216 at::OptionalDeviceGuard device_guard(r.deviceOptional(ARG_DEVICE1)); in sparse_coo_tensor_ctor() local 1249 at::OptionalDeviceGuard device_guard(r.deviceOptional(ARG_DEVICE2)); in sparse_coo_tensor_ctor() local
|
/aosp_15_r20/external/pytorch/torch/csrc/autograd/ |
H A D | python_torch_functions_manual.cpp | 55 OptionalDeviceGuard device_guard(device_of(result)); in dispatch_range() local 66 DeviceGuard device_guard(options.device()); in dispatch_range() local 152 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_nonzero() local 158 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_nonzero() local 164 OptionalDeviceGuard device_guard(device_of(self)); in dispatch_nonzero_numpy() local
|
/aosp_15_r20/external/pytorch/aten/src/ATen/cuda/detail/ |
H A D | CUDAHooks.cpp | 132 at::OptionalDeviceGuard device_guard; in isPinnedPtr() local 135 device_guard.reset_device(at::Device(at::DeviceType::CUDA, *primary_ctx_device_index)); in isPinnedPtr() 458 at::DeviceGuard device_guard(at::Device(at::DeviceType::CUDA, device_index)); in deviceSynchronize() local
|
/aosp_15_r20/external/pytorch/aten/src/ATen/cuda/ |
H A D | EmptyTensor.cpp | 16 const DeviceGuard device_guard(device); in empty_cuda() local 56 const DeviceGuard device_guard(device); in empty_strided_cuda() local
|
/aosp_15_r20/external/pytorch/torch/csrc/profiler/stubs/ |
H A D | cuda.cpp | 89 at::cuda::OptionalCUDAGuard device_guard; in onEachDevice() local 91 device_guard.set_index(i); in onEachDevice()
|
/aosp_15_r20/external/pytorch/test/cpp_extensions/open_registration_extension/pytorch_openreg/csrc/ |
H A D | OpenRegMem.cpp | 73 const c10::DeviceGuard device_guard(device); in empty_openreg() local 91 const c10::DeviceGuard device_guard(device); in empty_strided_openreg() local
|
/aosp_15_r20/external/pytorch/c10/xpu/test/impl/ |
H A D | XPUGuardTest.cpp | 19 const c10::DeviceGuard device_guard(device); in TEST() local 38 const c10::DeviceGuard device_guard(device); in TEST() local
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/sparse/cuda/ |
H A D | SparseSemiSturcturedApply.cu | 37 std::optional<at::cuda::CUDAGuard> device_guard; 39 device_guard.emplace(input.device());
|