Skip to content

Rename oneAPI backend to Altera, remove oneAPI compatibility - #1536

Draft
jmitrevs wants to merge 9 commits into
mainfrom
rename_altera_no_oneapi
Draft

Rename oneAPI backend to Altera, remove oneAPI compatibility#1536
jmitrevs wants to merge 9 commits into
mainfrom
rename_altera_no_oneapi

Conversation

@jmitrevs

Copy link
Copy Markdown
Contributor

Description

This PR renames the old oneAPI branch as Altera (with the help of AI) and removes oneAPI backwards compatibility.
It is a replacement of #1533, not including the lightweight oneAPI branch and related support.

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. This needs to be addressed in the CI system. In the meantime, local tests are being performed, and we will not move it from draft till we are satifsifed with the tests

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.

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

Renames the oneAPI backend to Altera, adopts the ahls toolchain, and updates backend integrations, templates, documentation, and tests.

Changes:

  • Registers Altera backend, writer, reports, optimization passes, and SYCL templates.
  • Migrates tests and synthesis baselines from oneAPI naming.
  • Updates user documentation for Altera HLS IP Gen.

Reviewed changes

Copilot reviewed 75 out of 143 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Updates backend summary.
docs/api/configuration.rst Updates configuration example.
docs/backend/altera.rst Documents Altera backend.
docs/backend/quartus.rst Updates migration guidance.
docs/index.rst Renames backend documentation entry.
docs/intro/setup.rst Updates toolchain requirements.
docs/intro/status.rst Updates backend status.
docs/ir/ir.rst Renames convolution backend reference.
hls4ml/backends/__init__.py Registers Altera backend.
hls4ml/backends/altera/__init__.py Defines backend package.
hls4ml/backends/altera/altera_backend.py Implements Altera backend and build flow.
hls4ml/backends/altera/altera_template.py Defines Altera templates.
hls4ml/backends/altera/altera_types.py Defines Altera type conversion.
hls4ml/backends/altera/passes/__init__.py Defines pass package.
hls4ml/backends/altera/passes/bn_quant.py Migrates quantized batch normalization.
hls4ml/backends/altera/passes/clone_templates.py Migrates clone templates.
hls4ml/backends/altera/passes/convolution_templates.py Migrates convolution templates.
hls4ml/backends/altera/passes/convolution_winograd.py Migrates Winograd transformation.
hls4ml/backends/altera/passes/core_templates.py Migrates core layer templates.
hls4ml/backends/altera/passes/einsum.py Migrates Einsum pass.
hls4ml/backends/altera/passes/einsum_dense.py Migrates EinsumDense pass.
hls4ml/backends/altera/passes/embedding_templates.py Migrates embedding templates.
hls4ml/backends/altera/passes/feature_check.py Updates feature validation.
hls4ml/backends/altera/passes/merge_templates.py Migrates merge templates.
hls4ml/backends/altera/passes/pointwise.py Migrates pointwise optimization.
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 reshaping templates.
hls4ml/backends/altera/passes/resource_strategy.py Migrates resource strategy.
hls4ml/backends/altera/passes/transform_types.py Uses Altera type converters.
hls4ml/backends/fpga/fpga_types.py Updates AC type terminology.
hls4ml/backends/fpga/passes/hgq_proxy_model.py Updates Altera HGQ handling.
hls4ml/backends/vivado/passes/distributed_arithmetic.py Maps Altera DA flavor.
hls4ml/report/__init__.py Exports Altera report API.
hls4ml/report/altera_report.py Renames report parsing API.
hls4ml/writer/__init__.py Registers Altera writer.
hls4ml/writer/altera_writer.py Migrates project writer.
hls4ml/templates/altera/CMakeLists.txt Switches builds to ahls.
hls4ml/templates/altera/exception_handler.hpp Adds SYCL exception handling.
hls4ml/templates/altera/myproject_bridge.cpp Uses Altera emulator selector.
hls4ml/templates/altera/myproject_test.cpp Uses Altera selectors and headers.
hls4ml/templates/altera/firmware/defines.h Uses Altera SYCL headers.
hls4ml/templates/altera/firmware/myproject.cpp Uses Altera task sequences.
hls4ml/templates/altera/firmware/myproject.h Uses Altera pipe properties.
hls4ml/templates/altera/firmware/parameters.h Adds parameter template.
hls4ml/templates/altera/firmware/nnet_utils/nnet_activation.h Provides activation kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_activation_stream.h Provides streaming activations.
hls4ml/templates/altera/firmware/nnet_utils/nnet_batchnorm.h Provides batch normalization.
hls4ml/templates/altera/firmware/nnet_utils/nnet_batchnorm_stream.h Provides streaming batch normalization.
hls4ml/templates/altera/firmware/nnet_utils/nnet_code_gen.h Adds generated-code hook.
hls4ml/templates/altera/firmware/nnet_utils/nnet_common.h Uses Altera AC types.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d.h Provides Conv1D interface.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d_resource.h Provides resource Conv1D.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv1d_stream.h Provides streaming Conv1D.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv2d.h Provides Conv2D interface.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv2d_resource.h Provides resource Conv2D.
hls4ml/templates/altera/firmware/nnet_utils/nnet_conv2d_stream.h Provides streaming Conv2D.
hls4ml/templates/altera/firmware/nnet_utils/nnet_dense.h Provides dense kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_dense_stream.h Provides streaming dense kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv1d.h Provides depthwise Conv1D interface.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv1d_resource.h Provides depthwise Conv1D implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv2d.h Provides depthwise Conv2D interface.
hls4ml/templates/altera/firmware/nnet_utils/nnet_depthconv2d_resource.h Provides depthwise Conv2D implementation.
hls4ml/templates/altera/firmware/nnet_utils/nnet_einsum.h Provides Einsum kernel.
hls4ml/templates/altera/firmware/nnet_utils/nnet_einsum_dense.h Provides EinsumDense kernel.
hls4ml/templates/altera/firmware/nnet_utils/nnet_embed.h Provides embedding kernel.
hls4ml/templates/altera/firmware/nnet_utils/nnet_embed_stream.h Provides streaming embedding.
hls4ml/templates/altera/firmware/nnet_utils/nnet_helpers.h Provides backend helpers.
hls4ml/templates/altera/firmware/nnet_utils/nnet_merge.h Provides merge kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_merge_stream.h Provides streaming merge kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_mult.h Provides multiplication helpers.
hls4ml/templates/altera/firmware/nnet_utils/nnet_padding.h Provides padding kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_padding_stream.h Provides streaming padding.
hls4ml/templates/altera/firmware/nnet_utils/nnet_pooling.h Provides pooling kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_pooling_stream.h Provides streaming pooling.
hls4ml/templates/altera/firmware/nnet_utils/nnet_printf.h Provides device printing.
hls4ml/templates/altera/firmware/nnet_utils/nnet_recurrent.h Provides recurrent kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_recurrent_activation.h Provides recurrent activations.
hls4ml/templates/altera/firmware/nnet_utils/nnet_recurrent_stream.h Provides streaming recurrent kernels.
hls4ml/templates/altera/firmware/nnet_utils/nnet_resize.h Provides resize kernel.
hls4ml/templates/altera/firmware/nnet_utils/nnet_resize_stream.h Provides streaming resize.
hls4ml/templates/altera/firmware/nnet_utils/nnet_stream.h Provides stream utilities.
hls4ml/templates/altera/firmware/nnet_utils/nnet_transpose.h Provides transpose kernel.
hls4ml/templates/altera/firmware/nnet_utils/nnet_transpose_stream.h Provides streaming transpose.
hls4ml/templates/altera/firmware/nnet_utils/nnet_types.h Provides backend data types.
test/pytest/ci-template.yml Updates backend CI setup.
test/pytest/conftest.py Renames synthesis configuration.
test/pytest/synthesis_helpers.py Renames synthesis comparisons.
test/pytest/test_activations.py Uses Altera test cases.
test/pytest/test_batchnorm.py Uses Altera test cases.
test/pytest/test_bit_exact_grouped_conv.py Uses Altera bit-exact cases.
test/pytest/test_bit_exact_zeropadding.py Uses Altera bit-exact cases.
test/pytest/test_conv1d.py Uses Altera Conv1D cases.
test/pytest/test_embed.py Uses Altera embedding cases.
test/pytest/test_globalpooling.py Uses Altera pooling cases.
test/pytest/test_keras_api.py Migrates Keras backend coverage.
test/pytest/test_keras_v3_api.py Migrates Keras v3 coverage.
test/pytest/test_merge.py Uses Altera merge cases.
test/pytest/test_multi_dense.py Uses Altera dense cases.
test/pytest/test_multiout_network.py Uses Altera multi-output cases.
test/pytest/test_pointwiseconv.py Uses Altera pointwise cases.
test/pytest/test_pooling.py Uses Altera pooling cases.
test/pytest/test_pytorch_api.py Migrates PyTorch coverage.
test/pytest/test_qeinsum.py Uses Altera QEinsum cases.
test/pytest/test_qkeras.py Migrates QKeras coverage.
test/pytest/test_qkerasV3.py Migrates QKeras v3 coverage.
test/pytest/test_qonnx.py Uses Altera QONNX case.
test/pytest/test_recurrent_pytorch.py Migrates recurrent PyTorch coverage.
test/pytest/test_repack_stream.py Updates Altera reshape behavior.
test/pytest/test_report.py Tests Altera report parsing.
test/pytest/test_reshape.py Uses Altera reshape cases.
test/pytest/test_rnn.py Uses Altera RNN cases.
test/pytest/test_serialization.py Migrates serialization coverage.
test/pytest/test_stream_clone.py Uses Altera clone cases.
test/pytest/test_transpose_concat.py Uses Altera transpose cases.
test/pytest/test_upsampling.py Uses Altera upsampling cases.
test/pytest/test_zeropadding.py Uses Altera padding cases.
test/pytest/test_report/Altera/summary.ndjson Adds sample HLS report.
test/pytest/test_report/Altera/quartus.ndjson Adds sample Quartus report.
test/pytest/test_report/Altera/loop_attr.ndjson Adds sample loop report.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_dense_io_stream-Altera.json Adds streaming dense baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_dense_io_parallel-Altera.json Adds parallel dense 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_pooling_Altera-channels_last-valid-MaxPooling2D.json Adds MaxPooling2D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-MaxPooling1D.json Adds MaxPooling1D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-AveragePooling2D.json Adds AveragePooling2D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-valid-AveragePooling1D.json Adds AveragePooling1D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-MaxPooling2D.json Adds padded MaxPooling2D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-MaxPooling1D.json Adds padded MaxPooling1D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-AveragePooling2D.json Adds padded AveragePooling2D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_pooling_Altera-channels_last-same-AveragePooling1D.json Adds padded AveragePooling1D baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-sigmoid.json Adds streaming sigmoid baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-relu.json Adds streaming ReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-prelu.json Adds streaming PReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-leaky_relu.json Adds streaming LeakyReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_stream-Altera-elu.json Adds streaming ELU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-sigmoid.json Adds parallel sigmoid baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-relu.json Adds parallel ReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-prelu.json Adds parallel PReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-leaky_relu.json Adds parallel LeakyReLU baseline.
test/pytest/baselines/Altera/2025.0.1/test_keras_api_test_activations_io_parallel-Altera-elu.json Adds parallel ELU baseline.
Suppressed comments (1)

hls4ml/backends/altera/altera_backend.py:197

  • The implementation below checks for and invokes ahls, so this docstring still identifies the removed Intel oneAPI DPC++ compiler as the build tool. This misdirects users troubleshooting the new backend.

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

Comment thread test/pytest/conftest.py
'Vitis': os.getenv('VITIS_VERSION', '2024.1'),
'Quartus': os.getenv('QUARTUS_VERSION', 'latest'),
'oneAPI': os.getenv('ONEAPI_VERSION', '2025.0.1'),
'Altera': os.getenv('ONEAPI_VERSION', '2025.0.1'),
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/setup.rst Outdated
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