Skip to content

[SYCL][E2E] Extend KernelCompiler/sycl.cpp with std::complex math coverage#22168

Draft
Copilot wants to merge 1 commit into
syclfrom
copilot/add-complex-math-test-cases
Draft

[SYCL][E2E] Extend KernelCompiler/sycl.cpp with std::complex math coverage#22168
Copilot wants to merge 1 commit into
syclfrom
copilot/add-complex-math-test-cases

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

The KernelCompiler/sycl.cpp E2E test only exercised std::abs from <complex> when validating that cl_intel_devicelib_complex is wired up through the runtime kernel compiler. This extends coverage to additional std::complex<float> math functions.

Changes

  • DeviceLibrariesSource: invoke std::sin, std::cos, std::tan, std::exp, std::log, std::sqrt, std::pow, and std::sinh on std::complex<float> into new buffer slots.
  • test_device_libraries: grow the shared buffer from 4 to 12 elements; the existing ptr[i] != 1.0f check covers every new slot for input (1, 1).
  • Drop the stale "approximately {0.84, 1.41, ...}" comment that no longer matched the buffer layout.
ptr[4]  = std::sin (std::complex<float>{ptr[4],  ptr[4]}).real();
ptr[5]  = std::cos (std::complex<float>{ptr[5],  ptr[5]}).real();
ptr[6]  = std::tan (std::complex<float>{ptr[6],  ptr[6]}).real();
ptr[7]  = std::exp (std::complex<float>{ptr[7],  ptr[7]}).real();
ptr[8]  = std::log (std::complex<float>{ptr[8],  ptr[8]}).real();
ptr[9]  = std::sqrt(std::complex<float>{ptr[9],  ptr[9]}).real();
ptr[10] = std::pow (std::complex<float>{ptr[10], ptr[10]},
                    std::complex<float>{2.0f, 0.0f}).real();
ptr[11] = std::sinh(std::complex<float>{ptr[11], ptr[11]}).real();

Copilot AI changed the title [SYCL][E2E] Extend KernelCompiler/sycl.cpp with std::complex math function tests [SYCL][E2E] Extend KernelCompiler/sycl.cpp with std::complex math coverage May 29, 2026
Copilot AI requested a review from jinge90 May 29, 2026 08:08
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.

2 participants