Skip to content

Conversation

@tafk7
Copy link

@tafk7 tafk7 commented Oct 22, 2025

Refactors hardware custom operator retrieval across FINN to support kernel schema transformations, and adds Brainsmith plugin integration for external tooling.

Changes

1. Unified getHWCustomOp() wrapper (src/finn/util/basic.py)

Replaces direct getCustomOp(node) calls with getHWCustomOp(node, model) to support operators with kernel schemas. When a custom op has a kernel_schema attribute, the wrapper automatically calls build_design_space(model) to populate kernel-specific parameters before returning the instance. Updated 85+ callsites across transformations, analysis passes, tests, and notebooks.

2. Brainsmith plugin integration (src/finn/util/brainsmith_integration.py)

Adds setuptools plugin entrypoint that auto-discovers FINN components (build steps, hardware kernels, backend implementations) with zero runtime dependencies. Registered via brainsmith.plugins entry point in setup.cfg. Excludes non-synthesizable kernels without infer transformations.

tafk7 added 10 commits October 20, 2025 20:29
Replace all getCustomOp calls with getHWCustomOp across the codebase
to support kernel schema transformations.

Changes:
- Add getHWCustomOp(node, model=None, **kwargs) wrapper in util/basic.py
- Checks for kernel_schema attribute and calls get_kernel_model(model)
- Update all 85+ files across src/, tests/, notebooks/, and tutorials/
- Update helper functions in specialize_layers.py to accept model parameter
- Fix undefined registry references in derive_characteristic.py
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