pytorch/test/cpp
Julius Herb 8f54e56e62 Add optional device index to AOTIModelPackageLoader (#152093)
This is my suggestion for resolving #152087

This PR extends the constructor of `AOTIModelPackageLoader` with an (optional) device index. The device type is still determined by `metadata_["AOTI_DEVICE_KEY"]`, but the `device_index` argument can be used to move an AOTI model package to different devices like `cuda:0`, `cuda:1`, ... in a convenient way. AFAIK, this is not possible so far using `AOTIModelPackageLoader` alone. The default case (no device index specified) with `metadata_["AOTI_DEVICE_KEY"] == "cuda"` would lead to the current behavior, i.e., the model is loaded to device `cuda`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/152093
Approved by: https://github.com/desertfire
2025-05-04 11:40:12 +00:00
..
aoti_abi_check [AOTI] Fix complex64 not defined (#132810) 2024-08-08 18:08:23 +00:00
aoti_inference Add optional device index to AOTIModelPackageLoader (#152093) 2025-05-04 11:40:12 +00:00
api Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
c10d [c10d] Add _allgather_base , reduce_scatter , and _reduce_scatter_base into ProcessGroupMPI to enable FSDP with MPI backend (#150162) 2025-04-14 19:31:38 +00:00
common
dist_autograd Set RUNPATH so installed tests can find the required shared libraries (#136627) 2024-10-25 09:38:08 +00:00
jit Add two missing JIT tests to CMake (#152440) 2025-04-30 16:18:55 +00:00
lazy Introduce cache clearing APIs for the lazy graph executor (#144489) 2025-01-29 17:38:01 +00:00
lite_interpreter_runtime Add None return type to init -- tests (#132352) 2024-08-01 15:44:51 +00:00
monitor
profiler [codemod] Fix a few unused-variable issues in pytorch (#143517) 2024-12-19 00:18:08 +00:00
rpc [rpc] Fix unit test after c10::nullopt removal (#143690) 2024-12-20 23:36:07 +00:00
tensorexpr [CUDA][cuBLAS] Aten GEMM overload for FP32 output from FP16/BF16 inputs (#150812) 2025-04-18 01:53:26 +00:00
__init__.py