Skip to content

Rename the oneAPI backend to Altera - #1533

Closed
jmitrevs wants to merge 9 commits into
mainfrom
rename_altera
Closed

Rename the oneAPI backend to Altera#1533
jmitrevs wants to merge 9 commits into
mainfrom
rename_altera

Conversation

@jmitrevs

@jmitrevs jmitrevs commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

This PR renames the old oneAPI branch as Altera (with the help of AI), and based on discussions in #1529, this removes oneAPI backwards compatibility.

Actual ahls compatibility is a added by cherry-picking the commits from #1529.

Type of change

  • Documentation update
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Tests

The testing infrastructure does not currently support ahls so all the Altera backend tests are expected to fail. Not sure what is the best migration strategy for the tests. Maybe when we add back oneAPI support we go back to using that?

Test Configuration:

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@jmitrevs
jmitrevs marked this pull request as draft August 25, 2026 21:49
@jmitrevs
jmitrevs marked this pull request as ready for review August 26, 2026 05:40
@jmitrevs
jmitrevs marked this pull request as draft August 26, 2026 05:41
@jmitrevs

Copy link
Copy Markdown
Contributor Author

This is largely ready for review, except that we can't run ahls tests in our CI just yet.

@jmitrevs
jmitrevs requested a balanced review from Copilot August 26, 2026 05:42
@jmitrevs
jmitrevs requested a review from vloncar August 26, 2026 05:42
@jmitrevs jmitrevs mentioned this pull request Aug 26, 2026
12 tasks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces the Altera HLS backend and migrates oneAPI-oriented implementation, reporting, documentation, and tests to Altera naming while retaining a legacy oneAPI wrapper.

Changes:

  • Adds Altera SYCL templates, optimization passes, types, reporting, and registration.
  • Migrates backend test matrices and synthesis baselines to Altera.
  • Updates documentation for Altera HLS IP Gen and legacy oneAPI usage.

Reviewed changes

Copilot reviewed 79 out of 147 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates supported-backend wording.
docs/api/configuration.rst Uses Altera in configuration example.
docs/backend/altera.rst Documents Altera and legacy oneAPI.
docs/backend/quartus.rst Recommends migration to Altera.
docs/index.rst Links Altera backend documentation.
docs/intro/setup.rst Documents Altera toolchain setup.
docs/intro/status.rst Updates backend support status.
docs/ir/ir.rst Renames oneAPI references to Altera.
hls4ml/backends/__init__.py Registers the Altera backend.
hls4ml/backends/altera/__init__.py Initializes the Altera package.
hls4ml/backends/altera/altera_template.py Renames backend template abstractions.
hls4ml/backends/altera/altera_types.py Defines Altera-specific type converters.
hls4ml/backends/altera/passes/__init__.py Initializes Altera passes.
hls4ml/backends/altera/passes/bn_quant.py Migrates quantized batch-normalization imports.
hls4ml/backends/altera/passes/clone_templates.py Migrates stream-cloning templates.
hls4ml/backends/altera/passes/convolution_templates.py Migrates convolution templates.
hls4ml/backends/altera/passes/convolution_winograd.py Adds Altera Winograd transformation.
hls4ml/backends/altera/passes/core_templates.py Migrates core layer templates.
hls4ml/backends/altera/passes/einsum.py Uses Altera product types.
hls4ml/backends/altera/passes/einsum_dense.py Uses Altera dense product types.
hls4ml/backends/altera/passes/embedding_templates.py Migrates embedding templates.
hls4ml/backends/altera/passes/feature_check.py Updates unsupported-feature errors.
hls4ml/backends/altera/passes/merge_templates.py Migrates merge templates.
hls4ml/backends/altera/passes/pointwise.py Migrates pointwise-convolution passes.
hls4ml/backends/altera/passes/pooling_templates.py Migrates pooling templates.
hls4ml/backends/altera/passes/quantization_templates.py Migrates quantization templates.
hls4ml/backends/altera/passes/recurrent_templates.py Migrates recurrent templates.
hls4ml/backends/altera/passes/reshaping_templates.py Migrates reshape templates.
hls4ml/backends/altera/passes/resource_strategy.py Renames resource-strategy reference.
hls4ml/backends/altera/passes/transform_types.py Uses Altera type converters.
hls4ml/backends/fpga/fpga_types.py Updates AC fixed-point commentary.
hls4ml/backends/fpga/passes/hgq_proxy_model.py Adds Altera HGQ handling.
hls4ml/backends/vivado/passes/distributed_arithmetic.py Supports Altera DA flavor selection.
hls4ml/report/__init__.py Exports Altera report APIs.
hls4ml/report/altera_report.py Renames report parsing and printing APIs.
hls4ml/templates/altera/CMakeLists.txt Makes compiler selection configurable.
hls4ml/templates/altera/exception_handler.hpp Adds SYCL exception handling.
hls4ml/templates/altera/firmware/defines.h Uses the SYCL compatibility header.
hls4ml/templates/altera/firmware/myproject.cpp Uses portable task-sequence namespace.
hls4ml/templates/altera/firmware/myproject.h Uses portable Altera/Intel properties.
hls4ml/templates/altera/firmware/parameters.h Adds generated parameter template.
hls4ml/templates/altera/firmware/nnet_utils/hls4ml_sycl.h Selects Altera or Intel SYCL extensions.
hls4ml/templates/altera/firmware/nnet_utils/nnet_activation.h Adds activation implementations.
hls4ml/templates/altera/firmware/nnet_utils/nnet_batchnorm.h Adds parallel batch normalization.
hls4ml/templates/altera/firmware/nnet_utils/nnet_batchnorm_stream.h Adds streaming batch normalization.
hls4ml/templates/altera/firmware/nnet_utils/nnet_code_gen.h Adds code-generation placeholder.
hls4ml/templates/altera/firmware/nnet_utils/nnet_common.h Centralizes SYCL compatibility includes.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d.h Adds Conv1D dispatch.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d_resource.h Adds resource Conv1D algorithms.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d_stream.h Adds streaming Conv1D.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv2d.h Adds Conv2D dispatch.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv1d.h Adds depthwise Conv1D dispatch.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv1d_resource.h Adds depthwise Conv1D implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv2d.h Adds depthwise Conv2D dispatch.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv2d_resource.h Adds depthwise Conv2D implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_dense.h Adds dense resource implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_dense_stream.h Adds streaming dense implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_einsum.h Adds Einsum implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_einsum_dense.h Adds EinsumDense implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_embed.h Adds embedding implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_embed_stream.h Adds streaming embedding.
hls4ml/templates/altera/firmware/nnet_utils/nnet_helpers.h Adds generated-project helpers.
hls4ml/templates/altera/firmware/nnet_utils/nnet_mult.h Adds multiplication strategies.
hls4ml/templates/altera/firmware/nnet_utils/nnet_padding.h Adds parallel zero padding.
hls4ml/templates/altera/firmware/nnet_utils/nnet_padding_stream.h Adds streaming zero padding.
hls4ml/templates/altera/firmware/nnet_utils/nnet_printf.h Adds device printf helper.
hls4ml/templates/altera/firmware/nnet_utils/nnet_recurrent_activation.h Adds recurrent activation wrappers.
hls4ml/templates/altera/firmware/nnet_utils/nnet_recurrent_stream.h Adds streaming GRU support.
hls4ml/templates/altera/firmware/nnet_utils/nnet_resize.h Adds nearest-neighbor resize.
hls4ml/templates/altera/firmware/nnet_utils/nnet_resize_stream.h Adds streaming resize.
hls4ml/templates/altera/firmware/nnet_utils/nnet_transpose.h Adds transpose implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_transpose_stream.h Adds streaming transpose.
hls4ml/templates/altera/firmware/nnet_utils/nnet_types.h Adds array, pipe, and shift-register types.
hls4ml/templates/altera/myproject_bridge.cpp Uses portable FPGA selector namespace.
hls4ml/templates/altera/myproject_test.cpp Uses portable FPGA selectors.
hls4ml/writer/__init__.py Registers the Altera writer.
test/pytest/ci-template.yml Relabels oneAPI environment setup.
test/pytest/conftest.py Adds Altera synthesis configuration.
test/pytest/synthesis_helpers.py Adds Altera report comparison.
test/pytest/test_activations.py Migrates activation tests to Altera.
test/pytest/test_batchnorm.py Migrates batch-normalization tests.
test/pytest/test_bit_exact_grouped_conv.py Migrates grouped-convolution checks.
test/pytest/test_bit_exact_zeropadding.py Migrates zero-padding bit-exact tests.
test/pytest/test_conv1d.py Migrates Conv1D tests and IDs.
test/pytest/test_embed.py Migrates embedding tests and IDs.
test/pytest/test_globalpooling.py Migrates global-pooling tests.
test/pytest/test_keras_api.py Migrates Keras API tests.
test/pytest/test_keras_v3_api.py Migrates Keras v3 tests.
test/pytest/test_merge.py Migrates merge tests.
test/pytest/test_multi_dense.py Migrates multi-dense tests.
test/pytest/test_multiout_network.py Migrates multi-output tests.
test/pytest/test_oneapi_backend.py Tests Altera and legacy oneAPI generation.
test/pytest/test_pointwiseconv.py Migrates pointwise-convolution tests.
test/pytest/test_pooling.py Migrates pooling tests.
test/pytest/test_pytorch_api.py Migrates PyTorch API tests.
test/pytest/test_qeinsum.py Migrates quantized Einsum tests.
test/pytest/test_qkeras.py Migrates QKeras tests.
test/pytest/test_qkerasV3.py Migrates QKeras v3 tests.
test/pytest/test_qonnx.py Migrates QONNX tests.
test/pytest/test_recurrent_pytorch.py Migrates PyTorch recurrent tests.
test/pytest/test_repack_stream.py Migrates stream-repacking tests.
test/pytest/test_report.py Tests Altera report parsing.
test/pytest/test_report/Altera/loop_attr.ndjson Adds sample loop report.
test/pytest/test_report/Altera/quartus.ndjson Adds sample Quartus report.
test/pytest/test_report/Altera/summary.ndjson Adds sample HLS report.
test/pytest/test_reshape.py Migrates reshape tests.
test/pytest/test_rnn.py Migrates recurrent test cases and IDs.
test/pytest/test_serialization.py Migrates serialization tests.
test/pytest/test_stream_clone.py Migrates stream-cloning tests.
test/pytest/test_transpose_concat.py Migrates transpose/concatenate tests.
test/pytest/test_upsampling.py Migrates upsampling tests.
test/pytest/test_zeropadding.py Migrates zero-padding tests.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-MaxPooling2D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-MaxPooling1D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-AveragePooling2D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-AveragePooling1D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-MaxPooling2D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-MaxPooling1D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-AveragePooling2D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-AveragePooling1D.json Adds synthesis baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_dense_io_stream-Altera.json Adds dense-stream baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_dense_io_parallel-Altera.json Adds dense-parallel baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_conv2d_io_parallel-Altera-Resource-same-channels_last.json Adds Conv2D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-sigmoid.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-relu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-prelu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-leaky_relu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-elu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-sigmoid.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-relu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-prelu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-leaky_relu.json Adds activation baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-elu.json Adds activation baseline.
Suppressed comments (2)

docs/backend/altera.rst:9

  • This documentation explicitly promises that the oneAPI backend remains available, while the PR description says oneAPI backward compatibility is removed. Please make the implementation/documentation and stated breaking-change policy agree so users know whether backend='oneAPI' remains supported.
    hls4ml/backends/altera/passes/resource_strategy.py:13
  • Correct the typo in the resource-strategy explanation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/pytest/ci-template.yml Outdated
Comment on lines 31 to 32
# Load Intel oneAPI environment variables for the Altera backend
- source /opt/intel/oneapi/setvars.sh --force
Comment thread docs/intro/status.rst Outdated
jmitrevs and others added 2 commits August 26, 2026 00:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jmitrevs

jmitrevs commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Locally some Altera tests fail, so this is not ready for merging. I am curious if the analogous oneAPI tests pass. (I accidentally destroyed my oneAPI setup so I can't check locally at the moment.) They fail the same way in #1529.

@jmitrevs

Copy link
Copy Markdown
Contributor Author

Superseded by #1536.

@jmitrevs jmitrevs closed this Aug 28, 2026
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.

3 participants