Logo de Dpnp Troubleshooting

Dpnp Troubleshooting

Organização
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).

Visão geral

Publicado porintel
Repositórioskills
Nome da habilidadedpnp-troubleshooting
Estrelas
31
Forks
14
Arquivos incluídos
2
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • 2 arquivos incluídos

    Scripts, modelos de documentos e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente leitura e nunca são executados.

  • Código aberto

    Publicada por intel no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Dpnp Troubleshooting no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Dpnp Troubleshooting em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Dpnp Troubleshooting automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Dpnp Troubleshooting não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu 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.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Dpnp Troubleshooting faz?

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 que usar Dpnp Troubleshooting no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Dpnp Troubleshooting é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Dpnp Troubleshooting no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/intel/skills/tree/main/skills/dpnp-troubleshooting. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Dpnp Troubleshooting?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Dpnp Troubleshooting?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Dpnp Troubleshooting com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Dpnp Troubleshooting é gratuita?

Sim. A habilidade é publicada no GitHub por intel sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇