Logo di Dpnp Quickstart

Dpnp Quickstart

Organizzazione
intel
dpnp-quickstart

Getting started with new dpnp code on Intel CPUs and GPUs: installing dpnp, listing dpctl devices and choosing a device or queue, pinning work to the CPU or a GPU, timing dpnp against NumPy, and profiling a dpnp loop. Use when the user is setting up dpnp for the first time, wants to see which devices are visible, or wants a benchmark of dpnp against NumPy. Not for porting an existing codebase (dpnp-migration) or for errors that appear after the port (dpnp-troubleshooting).

Panoramica

Autoreintel
Repositoryskills
Nome della skilldpnp-quickstart
Stelle
31
Fork
14
File inclusi
2
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 2 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da intel su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Dpnp Quickstart in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/intel/skills/tree/main/skills/dpnp-quickstart
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'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-quickstart .claude/skills/dpnp-quickstart
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Dpnp Quickstart in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Dpnp Quickstart non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Dpnp Quickstart non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

dpnp quickstart

Purpose

Runs NumPy-style array operations on Intel CPUs and GPUs through dpnp, which mirrors the NumPy API over SYCL device memory. Covers installation, SYCL device selection with dpctl, migrating existing NumPy code, falling back to NumPy for unimplemented APIs, and measuring whether the move actually paid off.

Prefer this over plain NumPy when the arrays are large and the work is math-heavy on Intel hardware. Prefer plain NumPy when the arrays are small — dpnp has dispatch overhead that a small array cannot amortize.

When to Use This Skill

Use this skill when:

  • The user is trying dpnp for the first time on Intel CPU or GPU execution.
  • The user asks whether a NumPy hot path can run on an Intel GPU.
  • The user needs to check a dpnp install, or which SYCL device will be used.
  • The user wants to compare dpnp against NumPy.

Porting an existing NumPy or CuPy codebase is dpnp-migration; an error that appears after the port, such as a NumPy API dpnp does not implement, is dpnp-troubleshooting.

Use dpnp for:

  • Large arrays (>10,000 elements)
  • Math-heavy operations (linear algebra, FFT, reductions)
  • Intel CPU/GPU acceleration

Do not use this skill — stick with NumPy — for:

  • Small arrays (<1,000 elements)
  • I/O operations
  • APIs not yet implemented in dpnp

Quick Start

Run this first to confirm the environment before changing any user code.

bash
# Conda (officially recommended)
conda install -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels dpnp

# Alternative: pip (may have native dependency issues)
pip install dpnp

# verify installation
python -c "import dpnp; print(dpnp.__version__)"

Then confirm which device the arrays will actually land on:

python
import dpctl
import dpnp as np

print(dpctl.select_default_device())

x = np.arange(100_000)
print(x.sycl_device)

Report what this prints. Do not claim GPU execution if the output shows a CPU device — the default SYCL device is the GPU only when one is visible.

Implementation Guide

  1. Confirm the environment — install and print the device, as in Quick Start.

  2. Swap the import. dpnp is a drop-in NumPy replacement for the covered API:

    python
    # Drop-in NumPy replacement
    import dpnp as np
    
    # Create arrays
    x = np.array([1, 2, 3, 4])
    y = np.arange(1000000)
    
    # Operations work like NumPy
    result = np.sum(y)
    dot_product = np.dot(x, x)
  3. Port the hot path. Array creation, reductions, and linear algebra keep their NumPy spelling:

    python
    import dpnp as np
    
    # Array creation
    a = np.zeros((100, 100))
    b = np.ones(1000)
    c = np.linspace(0, 10, 100)
    
    # Math operations
    sum_val = np.sum(a)
    mean_val = np.mean(b)
    std_val = np.std(c)
    
    # Linear algebra
    mat = np.random.randn(100, 100)
    result = np.dot(mat, mat.T)
  4. Add fallbacks for uncovered APIs. dpnp implements a subset of NumPy, and coverage is per-parameter, not just per-function. Check with dir(dpnp) or the documentation, and guard the call:

    python
    import dpnp
    import numpy as np
    
    def safe_unique(x):
        try:
            return dpnp.unique(x)
        except (NotImplementedError, TypeError):
            host_x = dpnp.asnumpy(x) if isinstance(x, dpnp.ndarray) else x
            return np.unique(host_x)
  5. Convert at API boundaries, not inside loops. Use dpnp.asnumpy() when a downstream library needs a NumPy array. Pandas, scikit-learn, and many NumPy-based libraries usually expect NumPy arrays: use dpnp for the numeric hot path, then convert once with asnumpy() before calling host-oriented libraries. Repeated device-to-host copies inside tight loops can erase acceleration gains.

  6. Constrain the device when the code must be portable. There is no ambient current-device setting and no context manager to enter — placement is an argument at construction. Inspect what is visible with dpctl, then pin allocation with device= or by reusing an existing array's queue, when the same code runs across workstations, containers, and cloud VMs with different SYCL devices:

    python
    import dpctl
    import dpnp
    
    print([d.filter_string for d in dpctl.get_devices()])   # what is actually there
    
    x = dpnp.arange(100_000, device="cpu")                  # pin this array
    print(x.sycl_device)
    
    y = dpnp.zeros(x.size, sycl_queue=x.sycl_queue)         # keep the next one beside it
  7. Validate, then measure. Compare against NumPy with numpy.testing.assert_allclose() for critical math before making any performance claim.

Performance

No verified benchmark numbers ship with this skill yet. Do not state a speedup that measurement in the user's own environment does not support.

To measure:

  • Warm up once before timing, to avoid measuring first-run compilation.
  • Compare against NumPy with the same inputs and dtype.
  • Profile end-to-end pipelines, including conversions and host-library calls.

Gotchas & Limitations

  • First run is slow: JIT compilation happens on first execution. Time the second run.
  • Not all NumPy APIs available: Check compatibility with dir(dpnp) or documentation.
  • Data transfer cost: Converting between dpnp and NumPy arrays has overhead. Avoid in tight loops.
  • Small arrays slower: dpnp has dispatch overhead. Use NumPy for small arrays (<1,000 elements).
  • Parameter-level gaps: a function existing in dpnp does not mean every NumPy keyword argument is accepted — TypeError on an unexpected keyword is the common symptom.
  • Device assumptions: the default SYCL device is whatever is visible. Code that works on a GPU workstation can land on CPU in CI without erroring.

References

FileLoad it when
references/official-sources.mdyou need to check a claim against upstream documentation — API coverage for a given release, install prerequisites, or which dpnp version implements a function

Two questions in this skill should not be answered from memory, and this is where they get answered: is this NumPy API covered (coverage is per keyword argument and changes between releases) and is this package available for the user's platform.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Dpnp Quickstart?

Getting started with new dpnp code on Intel CPUs and GPUs: installing dpnp, listing dpctl devices and choosing a device or queue, pinning work to the CPU or a GPU, timing dpnp against NumPy, and profiling a dpnp loop. Use when the user is setting up dpnp for the first time, wants to see which devices are visible, or wants a benchmark of dpnp against NumPy. Not for porting an existing codebase (dpnp-migration) or for errors that appear after the port (dpnp-troubleshooting).

Perché usare Dpnp Quickstart su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Dpnp Quickstart è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Dpnp Quickstart in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/intel/skills/tree/main/skills/dpnp-quickstart. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Dpnp Quickstart?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Dpnp Quickstart?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Dpnp Quickstart: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Dpnp Quickstart è gratuita?

Sì. È pubblicata su GitHub da intel con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇