torch: support in-place operations on views (#9371)

* add torch inplace tests

* first set of tests passing

* wrap all inplace funcs, add more tests

* fixes and wrap more functions

* fix all uint8 tests to avoid slow tests

* fix the one test

* another test, another fix

* and one more, works for ddp now

* something on contiguous, cleanup

---------

Co-authored-by: qazal <77887910+Qazalin@users.noreply.github.com>
This commit is contained in:
Priyank Patel
2025-03-10 08:29:00 -07:00
committed by GitHub
parent 2afc7759a7
commit 796c3bbb23
3 changed files with 144 additions and 26 deletions

View File

@@ -175,6 +175,8 @@ jobs:
run: PYTHONPATH=. DEBUG=2 python3 extra/torch_backend/torch_tests.py TestTinyBackendPRIVATEUSE1.test_unary_log_tiny_float32
- name: Test Ops with TINY_BACKEND (expect failure)
run: PYTHONPATH=. LLVM=1 LLVMOPT=0 TINY_BACKEND=1 python3 -m pytest -n auto test/test_ops.py --durations=20 || true
- name: Test in-place operations on views
run: PYTHONPATH=. TORCH_DEBUG=1 python3 extra/torch_backend/test_inplace.py
torchbackendmore:
name: Torch Backend Tests More