Skip to content

Remove remaining OpenCL #486

Merged
kiritigowda merged 7 commits into
ROCm:developfrom
daniellegillai:remove-opencl
Jul 23, 2026
Merged

Remove remaining OpenCL #486
kiritigowda merged 7 commits into
ROCm:developfrom
daniellegillai:remove-opencl

Conversation

@daniellegillai

@daniellegillai daniellegillai commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

OpenCL is deprecated in rocAL, but there were still remaining references to it in the README and checks in the code.

Technical Details

Removed OpenCL backend support:

  • Deleted RocalMemType::OCL and updated memory type checks from OCL || HIP to HIP only
  • Deleted CHECK_CL_CALL_RET (master_graph.cpp)
  • Deleted OpenCL data transfer kernels (device_data_transfer_code.h)
  • Removed OpenCL from build system
  • Removed OpenCL instructions from README and docs.

Test Plan

rocAL ctests.

Test Result

When in addition to this PR, PR #485 is also applied in order to fix issue #484, all 21 ctests pass.

Submission Checklist

@daniellegillai
daniellegillai requested review from a team, kiritigowda and rrawther as code owners July 10, 2026 18:52

@rrawther rrawther left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

device_data_transfer_code.h might be used for HIP backend. Please check

Comment thread rocAL/include/device/device_data_transfer_code.h
@kiritigowda kiritigowda self-assigned this Jul 16, 2026
@kiritigowda kiritigowda added the enhancement New feature or request label Jul 16, 2026
@kiritigowda
kiritigowda requested a review from rrawther July 16, 2026 19:07

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

This PR completes the removal of deprecated OpenCL backend support from rocAL by deleting OpenCL-specific code paths, updating memory-type conditionals to be HIP-only for GPU flows, and removing OpenCL-facing build/setup/documentation references.

Changes:

  • Removed RocalMemType::OCL and updated GPU/host branching to treat HIP as the only GPU backend.
  • Deleted OpenCL-specific utilities (e.g., OpenCL transfer kernels, OpenCL CMake finder, and related macros) and removed OpenCL backend build logic.
  • Updated user-facing setup/help text and docs to remove OpenCL instructions/options.

Reviewed changes

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

Show a summary per file
File Description
rocAL/source/pipeline/tensor.cpp Removes OpenCL memory mapping in vx_mem_type().
rocAL/source/pipeline/ring_buffer.cpp Updates buffer-selection and metadata checks to treat HIP as the only GPU path.
rocAL/source/pipeline/master_graph.cpp Removes OpenCL macro and updates GPU-affinity checks from OCL/HIP to HIP only.
rocAL/source/loaders/video/video_loader.cpp Updates loader output handling to treat HIP as the only GPU backend.
rocAL/source/loaders/image/numpy_loader.cpp Updates tensor update path to treat HIP as the only GPU backend.
rocAL/source/loaders/image/image_loader.cpp Updates image update path to treat HIP as the only GPU backend.
rocAL/source/loaders/image/cifar10_loader.cpp Updates CIFAR10 loader output handling to treat HIP as the only GPU backend.
rocAL/source/loaders/audio/audio_loader.cpp Updates audio update path to treat HIP as the only GPU backend.
rocAL/include/pipeline/tensor.h Updates comments related to memory type/handles after OpenCL removal.
rocAL/include/pipeline/commons.h Removes OCL from RocalMemType and updates related documentation.
rocAL/include/device/device_data_transfer_code.h Deletes OpenCL data transfer kernels/utilities.
rocAL/CMakeLists.txt Removes OpenCL backend build logic and OpenCL-related checks.
rocAL-setup.py Removes OCL backend option and OpenCL ICD install logic.
README.md Removes OpenCL backend instructions and updates backend options in setup usage.
docs/install/rocAL-prerequisites.rst Updates documented setup options to HIP/CPU only.
CMakeLists.txt Updates printed backend options to remove OPENCL.
cmake/FindOpenCL.cmake Removes custom OpenCL finder module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rocAL/include/pipeline/commons.h Outdated
Comment thread rocAL/include/pipeline/tensor.h Outdated
Comment thread rocAL/include/pipeline/tensor.h Outdated
@kiritigowda

Copy link
Copy Markdown
Collaborator

@daniellegillai please address copilot review

@kiritigowda
kiritigowda merged commit e8abc4c into ROCm:develop Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants