Skip to content

refactor(ISA): generate compute kernels from a single input file - #395

Merged
ahuber21 merged 14 commits into
mainfrom
dev/improve-isa-dispatching
Nov 25, 2026
Merged

ahuber21 merged 14 commits into
mainfrom
dev/improve-isa-dispatching

Conversation

@ahuber21

Copy link
Copy Markdown
Member

This is the first PR in a series that will re-introduce what was there in #372.

I'm cherry-picking the changes and try to limit the scope of each PR.
This PR only removes the explicit dim macros in the source files and lets cmake generate the necessary bits.

@ahuber21
ahuber21 marked this pull request as ready for review September 24, 2026 14:03
@ahuber21
ahuber21 requested review from rfsaliev and removed request for ibhati September 28, 2026 17:45
@ethanglaser

Copy link
Copy Markdown
Member

Please rebase

Comment thread cmake/generate-dispatch-surface.cmake Resolved
Comment thread cmake/generate-dispatch-surface.cmake Resolved
Comment thread cmake/validate-dispatch-surface.cmake Resolved
// Important: If a project uses SVS and calls compute kernels on datatype
// combinations not in this list, they will be compiled with their project
// and won't support multi-arch dispatching
#define SVS_FOR_EACH_TYPE_PAIR(M, ...) \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like DISTANCE_{L2,IP,CS}_{EXTERN,INSTANTIATE}_TEMPLATE macros are removed outright. They're in an installed header, so any downstream user breaks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. What do you suggest?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old templates are now kept as shims for backward compatibility. Should we add a deprecation note?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we could deprecate, looks like there is some SVS functionality for doing so. A one-line comment above them pointing to SVS_INSTANTIATE_*, plus a note for next release to make sure we don't forget in https://github.com/intel/ScalableVectorSearch/releases/tag/untagged-c4c7c5079b9c2b168228.

Comment thread cmake/multi-arch.cmake Resolved
@ahuber21
ahuber21 force-pushed the dev/improve-isa-dispatching branch from 64cd9b8 to 24783ff Compare November 17, 2026 10:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ahuber21
ahuber21 requested a review from ethanglaser November 17, 2026 10:22
ahuber21 and others added 4 commits November 20, 2026 05:34
Paths built from PROJECT_SOURCE_DIR point at the parent project when
this file is included from a repo that vendors SVS as a submodule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR 395 made public headers depend on a configure-time header, breaking header-only
consumers. The committed default restores that; configure fails if it drifts from
the default declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmake_path(ABSOLUTE_PATH) rewrites an existing variable, and
SVS_DISPATCH_SOURCE_ROOT was never set, so the root came out empty and
configure failed to find the ISA translation units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ahuber21
ahuber21 merged commit 1eaa095 into main Nov 25, 2026
20 of 21 checks passed
@ahuber21
ahuber21 deleted the dev/improve-isa-dispatching branch November 25, 2026 19:37
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