Skip to content

refactor(tuning): simplify configuration and persistence - #1

Merged
voltjia merged 1 commit into
mingdaw689:feat/auto-tuningfrom
InfiniTensor:refactor/auto-tuning-simplification
Sep 1, 2026
Merged

voltjia merged 1 commit into
mingdaw689:feat/auto-tuningfrom
InfiniTensor:refactor/auto-tuning-simplification

Conversation

@voltjia

@voltjia voltjia commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Simplify Config auto-selection state and make operator calls resolve the device/configuration once before construction or dispatch.
  • Replace the hand-written tuning JSON reader/writer with privately linked nlohmann/json, centralize environment initialization, and remove src/tuning_utils.h.
  • Deduplicate generated module initialization and add focused generator plus C++ tuning-cache round-trip coverage.

Motivation

This is a stacked cleanup for InfiniTensor/InfiniOps#879, based on its head commit b2d3168d. The goal is to reduce branching, duplicated configuration handling, and custom serialization code without changing the feature's intended behavior.

Type of Change

  • feat - new feature / new operator / new platform
  • fix - bug fix
  • perf - performance improvement (no behavioral change)
  • refactor - code restructuring without behavior change
  • test - adding or fixing tests only
  • docs - documentation only
  • build / ci - build system or CI configuration
  • chore - tooling, formatting, or other non-code changes
  • Breaking change

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

Validated in accelerator-dev/nvidia:latest with InfiniRT 3fc917066e427351345037c9ef4ef56a5221b30a built with CPU and NVIDIA support.

INFINI_RT_ROOT=/infinirt-prefix \
INFINI_OPS_INSTALL_PREFIX=/workspace/build-nvidia/install/infini \
CPLUS_INCLUDE_PATH=/usr/local/cuda/include \
scripts/dev/test.sh nvidia --smoke

47 passed, 10 skipped, 6859 deselected
0 failed

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
CPU Yes passed as part of NVIDIA smoke build and C++ consumer tests smoke only
NVIDIA Yes smoke passed full suite not run
Iluvatar Yes not available locally CI pending
Hygon Yes not available locally no default PR job
MetaX Yes not available locally CI pending
Cambricon Yes not available locally CI pending
Moore Yes not available locally CI pending
Ascend Yes not available locally CI pending

Benchmark / Performance Impact

N/A. This PR is a code-structure cleanup and does not claim a performance change.

Notes for Reviewers

  • Review this as a delta on top of feat(auto-tuing): add a new auto-tuning system InfiniTensor/InfiniOps#879; its base branch is feat/auto-tuning.
  • nlohmann/json is a private dependency. CMake first reuses an installed 3.12.0 package, then falls back to the pinned 3.12.0 release archive and SHA-256.
  • The C++ cache test covers environment initialization, JSON persistence, second-process lookup, and invalid-JSON cache miss behavior.

@voltjia
voltjia merged commit ce3f498 into mingdaw689:feat/auto-tuning Sep 1, 2026
@voltjia
voltjia deleted the refactor/auto-tuning-simplification branch September 1, 2026 02:46
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.

1 participant