-@device_code_llvm @oneapi groups=1 items=1 sum_kernel_v2!(result, data)</code></pre><h2 id="Profiling"><a class="docs-heading-anchor" href="#Profiling">Profiling</a><a id="Profiling-1"></a><a class="docs-heading-anchor-permalink" href="#Profiling" title="Permalink"></a></h2><p>For performance profiling, see the <a href="../../usage/performance/#Performance-Guide">Performance Guide</a>.</p><h2 id="Troubleshooting"><a class="docs-heading-anchor" href="#Troubleshooting">Troubleshooting</a><a id="Troubleshooting-1"></a><a class="docs-heading-anchor-permalink" href="#Troubleshooting" title="Permalink"></a></h2><h3 id="Compilation-Errors"><a class="docs-heading-anchor" href="#Compilation-Errors">Compilation Errors</a><a id="Compilation-Errors-1"></a><a class="docs-heading-anchor-permalink" href="#Compilation-Errors" title="Permalink"></a></h3><p>If you encounter compilation errors:</p><ol><li><strong>Check type stability</strong>: Use <code>@device_code_warntype</code></li><li><strong>Inspect LLVM IR</strong>: Use <code>@device_code_llvm</code> to see if the issue is in LLVM generation</li><li><strong>Simplify the kernel</strong>: Comment out sections to isolate the problematic code</li><li><strong>Check argument types</strong>: Ensure arguments are GPU-compatible (isbits types)</li></ol><h3 id="SPIR-V-Issues"><a class="docs-heading-anchor" href="#SPIR-V-Issues">SPIR-V Issues</a><a id="SPIR-V-Issues-1"></a><a class="docs-heading-anchor-permalink" href="#SPIR-V-Issues" title="Permalink"></a></h3><p>If SPIR-V generation fails:</p><ol><li><strong>Update dependencies</strong>: Ensure SPIRV-LLVM-Translator is up to date</li><li><strong>Check device capabilities</strong>: Some operations require specific hardware features</li><li><strong>Reduce complexity</strong>: Very complex kernels might hit compiler limits</li></ol><h3 id="Performance-Issues"><a class="docs-heading-anchor" href="#Performance-Issues">Performance Issues</a><a id="Performance-Issues-1"></a><a class="docs-heading-anchor-permalink" href="#Performance-Issues" title="Permalink"></a></h3><p>If your kernel is slow:</p><ol><li><strong>Profile memory access patterns</strong>: Coalesced access is crucial</li><li><strong>Check occupancy</strong>: Are you launching enough work-items?</li><li><strong>Minimize barriers</strong>: Synchronization has overhead</li><li><strong>Use local memory wisely</strong>: It's faster than global memory but limited in size</li></ol></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../memory/">« Memory Management</a><a class="docs-footer-nextpage" href="../../level_zero/">Level Zero (oneL0) »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.16.1 on <span class="colophon-date" title="Tuesday 16 December 2025 09:17">Tuesday 16 December 2025</span>. Using Julia version 1.10.10.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments