Bin Bao
Bin Bao
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #89305 cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #96904
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #120513 * __->__ #119987 Summary: Move these util functions from an anonymous namespace to a common header so that later torchgen-ed files can...
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #120513 * #119987 Summary: The current C shim layer manually implements a C interface for a handful of ops. Obviously that's not...
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #125291 Summary: This is for JIT Inductor with cpp wrapper, fixing https://github.com/pytorch/pytorch/issues/117367. In the backward pass, we don't have real inputs to...
The problem is the backward pass has not been tested for cpp wapper, and turns out the input args need some special handling for backward. Repro: ``` TORCHINDUCTOR_CPP_WRAPPER=1 python test/inductor/test_torchinductor.py...
Repro: ``` TORCHINDUCTOR_CPP_WRAPPER=1 python test/inductor/test_torchinductor.py -k test_add_complex_cuda ``` Error: ``` /tmp/torchinductor_binbao/py310_cu121/inline_extension_cdy3k4cckv4oojxsjqcbasbhabkiauv2dj5hlkeexxvio47w3tfi/main.cpp:96:52: error: cannot convert ‘long int’ to ‘const at::Tensor&’ 96 | auto buf2 = at::_ops::mul_Tensor::call(arg1_1, 2L); | ^~ | |...
This is a tracker issue for solving problems hit when enabling cpp wrapper codegen for JITInductor. The same problems exist for AOTInductor as well, but JITInductor makes it easier to...
Repro: Comment out https://github.com/pytorch/pytorch/blob/557e7c9c1686ac8b2c30d43d02b8fa235e39e96e/test/inductor/test_cpu_cpp_wrapper.py#L96, and then run ``` TORCHINDUCTOR_ABI_COMPATIBLE=1 python test/inductor/test_cpu_cpp_wrapper.py -k test_tensor2_cpu ``` Error: ``` Output: /tmp/torchinductor_binbao/d4/cd437gckepi76t4iqpgrbjfh6ohbuaywg6rhs3zi2yzlhhgb6vrb.cpp: In function ‘void inductor_entry_impl(AtenTensorOpaque**, AtenTensorOpaque**)’: /tmp/torchinductor_binbao/d4/cd437gckepi76t4iqpgrbjfh6ohbuaywg6rhs3zi2yzlhhgb6vrb.cpp:81:38: error: use of deleted function ‘torch::aot_inductor::RAIIAtenTensorHandle::RAIIAtenTensorHandle(const...
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #125330 * #125329 Summary: Fix https://github.com/pytorch/pytorch/issues/117365. When the second argument to aten.mul.Tensor is a scalar (e.g. scale factor), the cpp wrapper expects...