Home
last modified time | relevance | path

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

/aosp_15_r20/external/pytorch/test/cpp_api_parity/
H A Dutils.py179 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)
189 def move_cpp_tensors_to_device(cpp_tensor_stmts, device): argument
190 return [f'{tensor_stmt}.to("{device}")' for tensor_stmt in cpp_tensor_stmts]