pytorch/torch/csrc/api
Zhengxu Chen 83875cdb55 [nativert] Expose ModelRunner to public through pmpl type ModelRunnerHandle. (#159989)
Summary:
Today users outside of pytorch core cannot `#include <torch/nativert/ModelRunner.h>`.

It turns out that we should place a header inside `torch/csrc/api/include/`. Placing every single nativert header here would pollute the namespace a lot and that's not what we want in general. Therefore here we just create a Handle type which hold a pointer to decouple the actual type from header definition.

Test Plan:
CI

Rollback Plan:

Differential Revision: D79751098

Pull Request resolved: https://github.com/pytorch/pytorch/pull/159989
Approved by: https://github.com/dolpm
2025-08-07 14:23:21 +00:00
..
include/torch [nativert] Expose ModelRunner to public through pmpl type ModelRunnerHandle. (#159989) 2025-08-07 14:23:21 +00:00
src Detach tensor before clone in SGD optimiser and other code (#159204) 2025-07-27 03:31:12 +00:00