Skip to content

build: use xtc-build for host artifacts - #142

Merged
guillon merged 2 commits into
xtc-tools:mainfrom
guillon:dev/cguillon/xtc-build
Sep 16, 2026
Merged

guillon merged 2 commits into
xtc-tools:mainfrom
guillon:dev/cguillon/xtc-build

Conversation

@guillon

@guillon guillon commented Sep 16, 2026

Copy link
Copy Markdown
Member

Motivation

Replace hand-written compiler, archiver, and linker invocations with the reusable xtc-build package.

Description

Use xtc-build to compile and link C-source and archive HostModule evaluators.

Update the TVM packed operator wrapper to describe its objects, archives, shared libraries, and architecture-specific toolchain through xtc-build. Preserve additional source flags and existing output filenames.

Add the xtc-build~=0.1.0 dependency.

This PR depends on #133, which introduces the TVM external_at support and additional C-source handling used by these changes.

Commits

  • tvm: output all csrcs in temp dir
  • build: use xtc-build for host artifacts

Discussion

The archive evaluator forces resolution of the payload symbol with -u rather than loading every member with --whole-archive.

TODO:

Testing

  • pytest tests/pytest/unit -q — 53 passed
  • TVM shared-library, C-source, and archive backend variants — 6 passed
  • External TVM microkernel test — passed
  • Ruff checks on changed code
  • Mypy check for TVMCompiler.py

@guillon guillon self-assigned this Sep 16, 2026
@guillon guillon added the refactor Refactoring or simplification of code label Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/xtc/backends/tvm/TVMCompiler.py 80.95% 2 Missing and 2 partials ⚠️
src/xtc/targets/host/HostAREvaluator.py 76.92% 2 Missing and 1 partial ⚠️
src/xtc/targets/host/HostCEvaluator.py 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@guillon
guillon force-pushed the dev/cguillon/xtc-build branch from 8837fdd to d359568 Compare September 16, 2026 17:38
@guillon
guillon enabled auto-merge September 16, 2026 17:38
@guillon
guillon merged commit 15b289e into xtc-tools:main Sep 16, 2026
9 checks passed
@guillon
guillon deleted the dev/cguillon/xtc-build branch September 16, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring or simplification of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant