Logotipo de Dpnp Troubleshooting

Dpnp Troubleshooting

Organización
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).

Descripción general

Editorintel
Repositorioskills
Nombre de la habilidaddpnp-troubleshooting
Estrellas
31
Forks
14
Archivos incluidos
2
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 2 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por intel en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Dpnp Troubleshooting en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Dpnp Troubleshooting en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Dpnp Troubleshooting automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Dpnp Troubleshooting no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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).

¿Por qué usar Dpnp Troubleshooting en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Dpnp Troubleshooting está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Dpnp Troubleshooting en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Dpnp Troubleshooting?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Dpnp Troubleshooting?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Dpnp Troubleshooting con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Dpnp Troubleshooting?

Sí. intel la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇