feat: refactor InfiniCore CPU runtime to InfiniRT#8
Conversation
2e80f6b to
866fc8d
Compare
|
@voltjia 麻烦嘉成帮我看下修改后 InfiniCore 接入 InfiniRT cpu 运行时的整体思路是否正确,后续我会完善细节,感谢! |
我看了一下,基本上没啥问题,就是咱们这次重构有个原则:尽量复用 CUDA Runtime API 的接口,换句话说,有些接口需要查一下 CUDA Toolkit 里面有没有,比如我好像没查到 |
ok,关于 CUDA Runtime API 接口我也调研罗列一下 |
InfiniCore CPU Runtime API 迁移判定表CUDA API 来源:
|
866fc8d to
7fd37b5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
1596dd5 to
187c34a
Compare
37c4913 to
a2aea14
Compare
* feat!: align runtime API and add runtime dispatch (#11) * Align runtime API with generated wrappers * Add default runtime dispatch specialization * Refactor runtime dispatch namespace * Use Abseil status for runtime device API * Revert "Use Abseil status for runtime device API" This reverts commit a26ddff. * Address runtime dispatch review feedback * Keep runtime API list in generator * Add TensorView constructor guard test * Align runtime memcpy kind constants with CUDA API * Use CUDA-style runtime memcpy constants * Use CUDA-style runtime memcpy constants * Move TensorView tests back into core test * Remove standalone TensorView test target * Remove standalone TensorView test file * Use fully qualified runtime API names in README * style: format runtime dispatch test * feat: refactor InfiniCore CPU runtime to InfiniRT (#8) Co-authored-by: Jiacheng Huang <huangjiacheng0709@outlook.com> * feat: add platform-adaptive runtime tests (#15) * feat: add runtime backend API foundation (#14) --------- Co-authored-by: spike-zhu <74974704+spike-zhu@users.noreply.github.com>
* feat!: align runtime API and add runtime dispatch (#11) * Align runtime API with generated wrappers * Add default runtime dispatch specialization * Refactor runtime dispatch namespace * Use Abseil status for runtime device API * Revert "Use Abseil status for runtime device API" This reverts commit a26ddff. * Address runtime dispatch review feedback * Keep runtime API list in generator * Add TensorView constructor guard test * Align runtime memcpy kind constants with CUDA API * Use CUDA-style runtime memcpy constants * Use CUDA-style runtime memcpy constants * Move TensorView tests back into core test * Remove standalone TensorView test target * Remove standalone TensorView test file * Use fully qualified runtime API names in README * style: format runtime dispatch test * feat: refactor InfiniCore CPU runtime to InfiniRT (#8) Co-authored-by: Jiacheng Huang <huangjiacheng0709@outlook.com> * feat: add platform-adaptive runtime tests (#15) * feat: add runtime backend API foundation (#14) --------- Co-authored-by: spike-zhu <74974704+spike-zhu@users.noreply.github.com>
Summary
scripts/generate_public_headers.pyso generated public runtime dispatch only emits functions supported by the enabled backend runtime headers.src/native/cpu/runtime_.h.Motivation
This prepares InfiniRT CPU runtime coverage for replacing InfiniCore runtime calls with InfiniRT runtime APIs.
Related: InfiniTensor/InfiniCore#1342
Type of Change
feat- new feature / new operator / new platformfix- bug fixperf- performance improvement (no behavioral change)refactor- code restructuring without behavior changetest- adding or fixing tests onlydocs- documentation onlybuild/ci- build system or CI configurationchore- tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Test Results on Supported Platforms
Full `pytest` output (optional)
Benchmark / Performance Impact
N/A. This PR changes runtime API coverage and dispatch generation, not performance-sensitive kernels.
Notes for Reviewers
MemGetInforeports/proc/meminfovalues on non-Windows platforms and returns invalid value if unavailable.