Skip to content

Conversation

GittyBurstein
Copy link

Summary

Implements the ARANGE operator for the SYCL backend, generating evenly-spaced sequences on SYCL devices (Intel GPUs). Enables fast tensor initialization. The changes are small and focused.

Changes

  • Added ARANGE kernel in element_wise.cpp
  • ARANGE support in ggml-sycl.cpp
  • Integrated into the SYCL compute pipeline

Implementation

  • 1D tensor: start, step, number of elements = tensor size
  • Parallel processing (256 threads) following existing SYCL patterns

Testing

  • All existing tests pass
  • ARANGE tests: sizes 1K–10M, step 0.01–100.0, output verified

Performance

  • Small data: CPU faster
  • Large data (>1M): GPU 2–3 × faster
  • Peak GPU throughput: ~3 GElements/sec (Intel Iris Xe)

Compatibility

  • F32, OpenCL, and Level Zero

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Sep 30, 2025
@GittyBurstein
Copy link
Author

This PR adds the ARANGE operator to the SYCL backend (small & focused changes),
bringing significant performance improvements on large tensors.

@ggerganov @ggerganov/ggml-maintainers –
Please review when convenient. This PR is ready for review & merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant