Skip to content

PyTorch interface#235

Merged
chhwang merged 139 commits intomainfrom
chhwang/torch
Apr 2, 2026
Merged

PyTorch interface#235
chhwang merged 139 commits intomainfrom
chhwang/torch

Conversation

@chhwang
Copy link
Copy Markdown
Contributor

@chhwang chhwang commented Aug 7, 2024

  • DLPack support
  • Support computation over external buffers
  • Add placeholder operator
  • Updated plan format
  • Operator bug fixes
  • Other interface changes

chhwang and others added 30 commits May 27, 2024 04:35
- Introduced support for multiple Runtime instances
- Added utility functions for multi-runtime management
- Ensured backward compatibility with existing usage patterns of Runtime
- Added unit tests for multi-runtime functionality

---------

Co-authored-by: noli <t-ngerawork@microsoft.com>
- Adds Torch to ARK tensor conversion support
- New ModelBufferManager class handles external buffer registration and
simplifies buffer access during kernel initialization
- Adds test cases for ARK to Torch conversion support

---------

Co-authored-by: Changho Hwang <changhohwang@microsoft.com>
@chhwang chhwang force-pushed the chhwang/torch branch 3 times, most recently from 82ed592 to 2069f08 Compare January 23, 2025 23:34
@chhwang chhwang merged commit a084189 into main Apr 2, 2026
5 of 9 checks passed
@chhwang chhwang deleted the chhwang/torch branch April 2, 2026 05:23
chhwang added a commit that referenced this pull request Apr 2, 2026
Merge main (including PRs #222, #235, #245) into the PR #215 branch.

Resolution strategy:
- Take main's version for all C++ core, Python API, and C++ binding files
  (features from PR #215 were reworked and landed via PRs #222 and #235)
- Remove superseded PR #215 files:
  - torch_mock.py (replaced by python/ark/torch/mock.py)
  - unittest_common.py (replaced by python/unittest/common.py)
  - model_buffer_manager.hpp (replaced by buffer_registry)
  - arkprof.py (Profiler class in main suffices)
  - model_7b_b1_s2048.py / plan_llama2_7b_b1_s2048.json (superseded by current llama examples)
- Rewrite test_conversion.py for current API:
  - get_torch_view() -> to_torch()
  - Remove delete_all_runtimes() / reset() calls
  - Use pytest_ark decorator and with-block pattern
- Rewrite torch_tutorial.py to use placeholder API instead of RuntimeModule
- Add test_conversion to test runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants