Skip to content

Merge recent PRs in development#2761

Closed
chuanyuf wants to merge 2 commits into
mainfrom
merge-charles-pr
Closed

Merge recent PRs in development#2761
chuanyuf wants to merge 2 commits into
mainfrom
merge-charles-pr

Conversation

@chuanyuf

Copy link
Copy Markdown
Contributor

Existing Sample Changes

Description

Guided Debugging Sample updates, Updates for oneAPI 2026.0 tools and drivers
Update cmake to at least 3.5, update readme document, and ensure memory release after use.

No new functions added for the PRs.

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Implement fixes for ONSAM Jiras

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [ x ] Command Line
  • oneapi-cli
  • Visual Studio
  • Eclipse IDE
  • VSCode
  • When compiling the compliler flag "-Wall -Wformat-security -Werror=format-security" was used

chuanyuf added 2 commits June 25, 2026 07:47
2025.3 Guided Debugging Sample updates
Updates for oneAPI 2026.0 tools and drivers

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates several guided debugging matrix-multiplication samples for Intel® oneAPI 2026.0 by refreshing documentation/tooling requirements, bumping CMake minimum version, and addressing USM lifetime management.

Changes:

  • Add explicit sycl::free(...) calls to release USM allocations after use in multiple samples.
  • Refresh README prerequisites/instructions for oneAPI 2026.0 (compiler/GDB/PTI versions, driver guidance, updated troubleshooting steps).
  • Increase cmake_minimum_required from 3.4 to 3.5 for the affected sample projects.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
Tools/ApplicationDebugger/guided_matrix_mult_SLMSize/src/1_matrix_mul_SLM_size.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_SLMSize/src/2_matrix_mul.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_SLMSize/README.md Updates oneAPI 2026.0 prerequisites/instructions; minor wording changes.
Tools/ApplicationDebugger/guided_matrix_mult_SLMSize/CMakeLists.txt Bumps CMake minimum version to 3.5.
Tools/ApplicationDebugger/guided_matrix_mult_RaceCondition/README.md Updates oneAPI 2026.0 prerequisites/instructions; refines debugging narrative.
Tools/ApplicationDebugger/guided_matrix_mult_RaceCondition/CMakeLists.txt Bumps CMake minimum version to 3.5.
Tools/ApplicationDebugger/guided_matrix_mult_InvalidContexts/src/1_matrix_mul_invalid_contexts.cpp Adds device enumeration/selection logic and frees USM allocations.
Tools/ApplicationDebugger/guided_matrix_mult_InvalidContexts/src/2_matrix_mul.cpp Adds device enumeration output and frees USM allocations.
Tools/ApplicationDebugger/guided_matrix_mult_InvalidContexts/README.md Updates oneAPI 2026.0 prerequisites/instructions; adds device-order caveats.
Tools/ApplicationDebugger/guided_matrix_mult_InvalidContexts/CMakeLists.txt Bumps CMake minimum version to 3.5.
Tools/ApplicationDebugger/guided_matrix_mult_Exceptions/src/1_matrix_mul_null_pointer.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_Exceptions/src/2_matrix_mul_multi_offload.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_Exceptions/src/3_matrix_mul.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_Exceptions/README.md Updates oneAPI 2026.0 prerequisites/instructions and debugging notes.
Tools/ApplicationDebugger/guided_matrix_mult_Exceptions/CMakeLists.txt Bumps CMake minimum version to 3.5.
Tools/ApplicationDebugger/guided_matrix_mult_BadBuffers/src/b1_matrix_mul_null_usm.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_BadBuffers/src/b2_matrix_mul_usm.cpp Frees USM allocations after host copy-back.
Tools/ApplicationDebugger/guided_matrix_mult_BadBuffers/README.md Updates oneAPI 2026.0 prerequisites/instructions; expands sanitizer/debugger walkthroughs.
Tools/ApplicationDebugger/guided_matrix_mult_BadBuffers/CMakeLists.txt Bumps CMake minimum version to 3.5.

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

// used to enqueue kernels. It encapsulates all states needed for execution.
{
queue q(default_selector_v);
property_list propList = property_list{property::queue::enable_profiling()};
Comment on lines +68 to +70
std::vector<sycl::device> devices = sycl::device::get_devices();
cout << "Devices:" << std::endl;

@@ -65,6 +65,19 @@ int main() {
{
property_list propList = property_list{property::queue::enable_profiling()};
Comment on lines +33 to +34
| Intel GraphicsHardware | GEN9 or newer
| Software | Intel® oneAPI DPC++/C++ Compiler 2026.0 <br> Intel® Distribution for GDB* 2026.0 <br> Unified Tracing and Profiling Tool 2.3.0, which is available from the [following Github repository](https://github.com/intel/pti-gpu/tree/master/tools/unitrace).
```

Similarly, we specify targeting the CPU, which sometimes can avoid problems in your code that are specific to offloading to the GPU.
Similarly, we an force the program to run on the CPU, which sometimes can avoid problems in your code that are specific to offloading to the GPU.
Comment on lines +9 to 10
| What you will learn | A method to determine the root cause problems from passing bad data through the SYCL runtime.
| Time to complete | 50 minutes
| Software | Intel® oneAPI DPC++/C++ Compiler 2025.1 <br> Intel® Distribution for GDB* 2025.1 <br> Unified Tracing and Profiling Tool 2.1.2, which is available from the [following Github repository](https://github.com/intel/pti-gpu/tree/master/tools/unitrace).
| Intel GPU Driver | Intel® General-Purpose GPU Rolling Release driver 2507.12 or later from https://dgpu-docs.intel.com/releases/releases.html
| Intel Graphics Hardware | GEN9 or newer
| Software | Intel® oneAPI DPC++/C++ Compiler 2026.0 <br> Intel® Distribution for GDB* 2026.0 <br> Unified Tracing and Profiling Tool 2.3.0, which is available from the [following Github repository](https://github.com/intel/pti-gpu/tree/master/tools/unitrace).
| Software | Intel® oneAPI DPC++/C++ Compiler 2025.1 <br> Intel® Distribution for GDB* 2025.1 <br> Unified Tracing and Profiling Tool 2.1.2, which is available from the [following Github repository](https://github.com/intel/pti-gpu/tree/master/tools/unitrace).
| Intel GPU Driver | Intel® General-Purpose GPU Rolling Release driver 2507.12 or later from https://dgpu-docs.intel.com/releases/releases.html
| Intel Graphics Hardware | GEN9 or newer
| Software | Intel® oneAPI DPC++/C++ Compiler 2026.0 <br> Intel® Distribution for GDB* 2026.0 <br> Unified Tracing and Profiling Tool 2.3.0, which is available from the [following Github repository](https://github.com/intel/pti-gpu/tree/master/tools/unitrace).
### Identify the Problem without Code Inspection

You must have already built the [Unified Tracing and Profiling Tool](#getting-the-tracing-and-profiling-tool). Once you have built the utility, you can start it before your program (similar to using GBD).
You need to build the [Unified Tracing and Profiling Tool](#getting-the-tracing-and-profiling-tool) before completing this section. Once you have built the utility, you can start it before your program (similar to using GBD).
#### Debugging the Problem

Why did we try with multiple backends? If one had shown correct or incorrect results, and one had crashed, we might be facing a race condition that only occasionally manifests as something that goes terribly wrong. Or one of the backbends might have a bug. But here all three crash, so it's likely the program is doing something illegal to memory. The host CPU is a particularly good place to test for illegal memory accesses, because the CPU never allows pointers with an address within a few kilobytes of address 0x0, while this may be legally allocated memory on the GPU.
Why did we try with multiple backends? If one had shown correct or incorrect results, and one had crashed, we might be facing a race condition that only occasionally manifests when something goes terribly wrong. Or one of the backbends might have a bug while the others do not. But here all three crash, so it's likely the program is doing something illegal to memory. The host CPU is a particularly good place to test for illegal memory accesses, because the CPU never allows pointers with an address within a few kilobytes of address `0x0`, while this may be legally allocated memory on the GPU.
@chuanyuf chuanyuf changed the title Merge changes from Charles recent PRs Merge recent PRs in development Jun 26, 2026
@chuanyuf chuanyuf closed this Jun 26, 2026
@chuanyuf chuanyuf deleted the merge-charles-pr branch June 26, 2026 14:57
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