Home
last modified time | relevance | path

Searched refs:python_tensors (Results 1 – 1 of 1) sorted by relevance

/aosp_15_r20/external/pytorch/test/cpp_api_parity/
H A Dutils.py158 def set_python_tensors_requires_grad(python_tensors): argument
161 for tensor in python_tensors
165 def move_python_tensors_to_device(python_tensors, device): argument
166 return [tensor.to(device) for tensor in python_tensors]
179 def set_cpp_tensors_requires_grad(cpp_tensor_stmts, python_tensors): argument
180 assert len(cpp_tensor_stmts) == len(python_tensors)
185 for tensor_stmt, (_, tensor) in zip(cpp_tensor_stmts, python_tensors)