Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)
Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)

💾 Downloads 🕛 vor 3 Monaten 2 Min Lesezeit
0

trunk/e0d9cf97915baca1b5f2a6758f5028858609ef28: [xpu] Refactor OneDNN C API to C++ API (#184486)

↗ Quelle (GitHub · github.com)
🗣️ Stimme:
📑 Inhaltsübersicht
🐙
$ git clone https://github.com/pytorch/pytorch.git

Summary


Replace oneDNN C API calls in DnnlExt.h (and update the callsite in WoQMatmul.cpp) with their C++ API equivalents for a consistent programming style across the XPU oneDNN integration layer.


Motivation


The existing code mixed oneDNN C API (dnnl_* functions, dnnl_exec_arg_t, const_dnnl_memory_desc_t, etc.) with the C++ API (dnnl::memory::desc, dnnl::matmul::primitive_desc, etc.) within the same file. This inconsistency made the code harder to read and maintain.


The C++ API also provides RAII semantics — destructors automatically handle resource cleanup (e.g., memory::desc, memory, primitive_desc are all properly destroyed on scope exit), eliminating the need for manual destroy calls and reducing the risk of resource leaks.


Changes


DnnlExt.hprimitive_ext class rewrite:







































Before (C API) After (C++ API)
dnnl_primitive_desc_query_md() matmul::primitive_desc::query_md()
dnnl_sycl_interop_memory_create() make_onednn_memory() (wraps dnnl::sycl_interop::make_memory())
dnnl_memory_desc_get_size() memory::desc::get_size()
dnnl_sycl_interop_primitive_execute() dnnl::sycl_interop::execute()
dnnl_exec_arg_t c_args[] (C struct array) std::unordered_map<int, memory>
const_dnnl_memory_desc_t return types memory::desc return types
#include <oneapi/dnnl/dnnl.h> (C header) #include <oneapi/dnnl/dnnl_sycl.hpp> (C++ header)

Key design change: primitive_ext now reconstructs a matmul::primitive_desc from the underlying primitive via get_primitive_desc(), enabling pure C++ query_md() calls.


WoQMatmul.cpp — callsite update:



  • set_attribute(): removed the manual slot index parameter; arguments are now keyed by arg_class in the internal map.

  • execute(): removed the slot_off parameter.


Test


Verified with WoQ (weight-only quantization) INT4 inference on Phi-3-mini-4k-instruct (FP16, XPU). Functional correctness and performance unchanged on BMG.



















No Primitive Cache Primitive Cache (before) Primitive Cache (after PR)
Next Token Latency (s) baseline -16.3% -14.9%

Pull Request resolved: ,

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf github.com.
↗ Original-Artikel auf github.com lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
Use custom web fonts in Google Sheets charts
2 Quellen
Introducing the new 1Password App for Google Chat
1 Quelle
Context-aware access controls are available for Gemini Enterprise in the Admin console
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten trunk/e0d9cf97915baca1b5f2a6758f5028858609ef28: [xpu] Refactor OneDNN C API to C++ API (#184486)

Thematisch verwandte Begriffe: trunke0d9cf97915baca1b5f2a6758f5028858609ef28, Refactor, OneDNN, 184486 · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...