Logo vun Dpnp Troubleshooting

Dpnp Troubleshooting

Organisatioun
intel
dpnp-troubleshooting

Diagnosing dpnp failures that appear once dpnp code runs on Intel CPUs and GPUs: NotImplementedError, AttributeError or a TypeError about a keyword raised by a dpnp call, import failures from a missing SYCL runtime library, no SYCL device visible, a dpctl device the user did not expect, dpnp code slower than the NumPy it replaced, and another library rejecting a dpnp array. Use when one of these symptoms shows up. Not for planning a port (dpnp-migration) or for first-time setup (dpnp-quickstart).

Iwwersiicht

Editeurintel
Repositoryskills
Skill-Nummdpnp-troubleshooting
Stären
31
Forks
14
Matgeliwwert Fichieren
2
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum intel op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Dpnp Troubleshooting an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/dpnp-troubleshooting .claude/skills/dpnp-troubleshooting
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Dpnp Troubleshooting an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Dpnp Troubleshooting automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Dpnp Troubleshooting net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

dpnp troubleshooting

Purpose

Turns a dpnp failure into the next command to run. Covers the five things that actually go wrong: an API that is not implemented, an import that cannot find the SYCL runtime, no visible device, a device that is not the one expected, and code that got slower instead of faster.

Prefer this skill over reading the traceback and guessing. Each symptom below has a check that produces an answer, and most of them are one line.

When to Use This Skill

Use this skill when:

  • dpnp raises NotImplementedError, AttributeError, or a TypeError about a keyword argument.
  • import dpnp fails, or fails on a missing libsycl shared object.
  • No SYCL device is found, or dpctl lists a different device than expected.
  • dpnp code is slower than the NumPy it replaced.
  • Another library rejects a dpnp array.

Do not use this skill to plan a migration (dpnp-migration), to size a workload against device memory (dpnp-memory), or as a source of speedup figures.

Quick Start

Three commands answer most questions before any code changes:

bash
python -c "import dpnp; print(dpnp.__version__)"
python -c "import dpctl; print([d.filter_string for d in dpctl.get_devices()])"
python -c "import dpnp; print(dpnp.arange(4).sycl_device)"

Version, what is visible, and where an array actually lands. Report what they print rather than what they were expected to print.

Implementation Guide

  1. NotImplementedError or a rejected keyword. dpnp implements a subset of NumPy, and coverage is per keyword argument as well as per function — a function that exists can still reject a signature. Do not gate on hasattr(dpnp, "name"); the attribute can be there and the call still fail. Guard the call instead:

    python
    import dpnp
    import numpy
    
    def safe_call(device_func, host_func, x):
        try:
            return device_func(x)
        except (NotImplementedError, AttributeError, TypeError):
            host = dpnp.asnumpy(x) if isinstance(x, dpnp.ndarray) else x
            return dpnp.array(host_func(host))
    
    unique = safe_call(dpnp.unique, numpy.unique, dpnp.array([1, 2, 2, 3]))
  2. Import failures. ImportError on the module name means it is not installed; OSError on libsycl.so means the package is there and the SYCL runtime is not. Install from the Intel conda channel, or the runtime alone from pip:

    bash
    conda install -c https://software.repos.intel.com/python/conda \
      -c conda-forge --override-channels dpnp dpctl
    
    pip install intel-cmplr-lib-rt      # SYCL runtime only
  3. No device, or the wrong device. dpctl.get_devices() returning an empty list means the driver stack is not visible to SYCL; dpnp then has only the host to fall back to. To pin execution while debugging, select the device explicitly at allocation, which is clearer than relying on process-wide state:

    python
    import dpctl
    import dpnp
    
    cpu = dpctl.SyclDevice("opencl:cpu:0")
    arr = dpnp.arange(1000, device=cpu)

    The same restriction from outside the process is ONEAPI_DEVICE_SELECTOR=opencl:cpu (it replaced the older SYCL_DEVICE_FILTER, which no longer has an effect on current runtimes).

  4. Slower than NumPy. Three causes, in the order they occur:

    • The array is too small, and dispatch dominates. Below roughly a thousand elements NumPy is the right answer; dpnp earns its keep on large arrays.

    • The first call was timed. It includes compilation, so time the second:

      python
      import time
      import dpnp
      
      x = dpnp.random.randn(100000)
      dpnp.sin(x)                                  # warm up, discard
      start = time.perf_counter()
      dpnp.sin(x)
      print(f"{time.perf_counter() - start:.4f}s")
    • A conversion sits inside the loop. dpnp.asnumpy() copies device to host every call; hoist it above the loop, or keep the whole loop on the device.

  5. Another library rejects the array. pandas, scikit-learn, PyTorch, and TensorFlow check for a NumPy array and refuse anything else. Convert once at the boundary with dpnp.asnumpy() — dpnp-interop has the per-library patterns.

Performance

No measured numbers ship with this skill, and a fix here is not evidence of a speedup. When a change is meant to make something faster, measure it:

  • Warm up first, then time the steady state.
  • Compare against the NumPy original on the same inputs and dtype.
  • Time the whole pipeline, including conversions — a loop body that got faster while the surrounding transfers got more frequent is a net loss.

Gotchas & Limitations

  • hasattr is not a coverage check. The attribute can exist and the call still raise. try/except is the only reliable gate.
  • A fallback that converts inside a loop is its own bug. Correct, and slower than never having moved to dpnp.
  • The default device is whatever is visible. Code that runs on a GPU workstation lands on a CPU in CI without raising, so "it worked locally" says nothing about where it ran.
  • intel-cmplr-lib-rt fixes the runtime, not the driver. A GPU that the kernel driver does not expose stays invisible whatever is installed in the environment.
  • Not covered: driver installation, container device passthrough, and multi-GPU scheduling.

References

FileLoad it when
references/official-sources.mdyou need the current install channels, the API coverage of the installed release, or the device selection environment variables — all three change between releases and must not be answered from memory

Two things here should never be answered from memory: which install channel and package names are current, and whether a given NumPy API is covered in the user's release. Both are documented upstream and both have already changed.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Dpnp Troubleshooting?

Diagnosing dpnp failures that appear once dpnp code runs on Intel CPUs and GPUs: NotImplementedError, AttributeError or a TypeError about a keyword raised by a dpnp call, import failures from a missing SYCL runtime library, no SYCL device visible, a dpctl device the user did not expect, dpnp code slower than the NumPy it replaced, and another library rejecting a dpnp array. Use when one of these symptoms shows up. Not for planning a port (dpnp-migration) or for first-time setup (dpnp-quickstart).

Firwat Dpnp Troubleshooting op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Dpnp Troubleshooting besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Dpnp Troubleshooting an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Dpnp Troubleshooting benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Dpnp Troubleshooting benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Dpnp Troubleshooting domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Dpnp Troubleshooting gratis?

Jo. De Skill gëtt vum intel ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇