Логотип Dpnp Linalg Fft

Dpnp Linalg Fft

Організація
intel
dpnp-linalg-fft

Linear algebra and FFT with dpnp on Intel CPUs and GPUs, backed by oneMKL. Use when a matrix multiply, solve, decomposition, eigenvalue problem, or Fourier transform is the hot part of NumPy code, when the user asks whether dpnp covers a linalg or FFT call, when an FFT result differs slightly from NumPy's, or when a large transform runs out of device memory. Covers the supported surface, transform sizing and plan reuse, fallbacks for what is missing, and how to check conditioning before solving.

Огляд

Видавецьintel
Репозиторійskills
Назва навичкиdpnp-linalg-fft
Зірки
31
Форки
14
Файли в пакеті
2
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 2

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: intel. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Dpnp Linalg Fft у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/intel/skills/tree/main/skills/dpnp-linalg-fft
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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-linalg-fft .claude/skills/dpnp-linalg-fft
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Dpnp Linalg Fft в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Dpnp Linalg Fft, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Dpnp Linalg Fft не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

dpnp linear algebra and FFT

Purpose

Routes linear algebra and Fourier transforms through dpnp, which dispatches them to oneMKL on Intel CPUs and GPUs. Covers what the API includes, how to size and warm a transform, what is not implemented and how to fall back to SciPy for it, and which numerical differences from NumPy are expected rather than bugs.

Prefer this skill when matrix or transform work is the expensive part of a NumPy program. Prefer plain NumPy for small operands, where the dispatch cost is not amortized, and SciPy for sparse problems, which have no dpnp equivalent.

When to Use This Skill

Use this skill when:

  • A matmul, solve, decomposition, or eigenvalue problem is the hot path.
  • An FFT or a convolution through FFT is the hot path.
  • The user needs to know whether dpnp implements a specific linalg or FFT call.
  • An FFT or a decomposition disagrees with NumPy in the last digits.
  • A large transform fails on device memory.

Do not use this skill for sparse linear algebra (scipy.sparse, on host arrays), for small operands, or as a source of speedup figures — there are none here on purpose.

Quick Start

python
import dpnp as np

A = np.random.randn(1000, 1000)
B = np.random.randn(1000, 1000)
C = A @ B                      # matmul, dispatched to oneMKL
x = np.linalg.solve(A, B)      # linear system

_ = np.fft.fft(np.zeros(1024))       # warm the plan for this size first
spectrum = np.fft.fft(np.random.randn(1024))

real_spectrum = np.fft.rfft(np.random.randn(2048))   # output length 1025

Implementation Guide

  1. Use the surface that exists. Matrix product as @, matmul(), or dot(); svd(), qr(), cholesky(); eig(), eigvals(), eigh(), eigvalsh(); solve(), lstsq(); inv(), det(), norm(), cond(), matrix_rank(); inner(), outer(), cross(). Prefer @ for readability and the function form when it has to be passed around. dot() and matmul() agree on 2-D and differ for higher rank.

  2. Batch instead of looping. The linalg functions take leading batch dimensions, so np.linalg.solve(A, B) with A.shape == (10, 100, 100) solves ten systems in one dispatch rather than ten.

  3. Pick the right transform. fft/ifft for complex input, rfft/irfft for real input (output length n // 2 + 1, exploiting conjugate symmetry), hfft/ihfft for Hermitian data, fft2/rfft2 for images, fftn/rfftn for higher rank, with fftfreq, rfftfreq, fftshift, and ifftshift as helpers. Using the real variants on real data halves the output.

  4. Size and warm transforms. A power-of-two length is the friendliest case; pad up to one when the trailing samples do not matter:

    python
    n_padded = 2 ** int(np.ceil(np.log2(n)))
    spectrum = np.fft.fft(np.pad(signal, (0, n_padded - n)))

    The first call on a new size pays for plan creation and compilation; subsequent calls on that size reuse it, with no explicit plan management.

  5. Check conditioning before solving, so a singular matrix produces an answer rather than an exception:

    python
    if np.linalg.cond(A) < 1e15:
        x = np.linalg.solve(A, b)
    else:
        x = np.linalg.lstsq(A, b, rcond=None)[0]
  6. Fall back deliberately for what is missing. Sparse problems, generalized eigenvalue problems, matrix functions such as expm, logm, sqrtm, and short-time transforms have no dpnp implementation. Convert, call SciPy, and convert back — once, at the boundary:

    python
    import scipy.linalg
    
    result = np.asarray(scipy.linalg.expm(np.asnumpy(A)))

    Verify coverage against the installed release rather than a remembered list: the set has grown between versions, and coverage can be per keyword argument.

Performance

No measured numbers ship with this skill, and none belong in it. What holds regardless of hardware:

  • There is a size below which dispatch dominates and NumPy is the better answer. Matrices in the hundreds of rows and transforms of a few hundred points are in that region; measure the actual shapes rather than adopting a threshold.
  • Compare a warmed-up run. The first call on a new shape includes compilation and plan creation, so timing it measures the wrong thing.
  • Real-input transforms do less work than complex ones on the same data.
  • Batched calls amortize dispatch that a Python loop pays per iteration.
  • A fallback to SciPy costs two transfers and host compute; count it in the end-to-end number, not just the call.

Gotchas & Limitations

  • Results are not bit-identical to NumPy. dpnp goes through oneMKL and NumPy through pocketfft or its own LAPACK; agreement is to within roundoff, and a comparison must use numpy.testing.assert_allclose, not equality.
  • Integer operands are not the fast path. Keep operands in float64 or complex128 unless there is a reason not to.
  • No sparse support at all. scipy.sparse on host arrays is the answer, not a dpnp equivalent.
  • Coverage claims expire. Any list of unimplemented functions is true of one release. Check dir(dpnp.linalg), dir(dpnp.fft), and the documentation for the installed version before telling a user something is missing.
  • Large transforms fail on device memory. Chunk the signal, or switch to a real-input transform; see dpnp-memory for capacity and chunking.

References

FileLoad it when
references/official-sources.mdyou need the linalg or FFT coverage of a specific dpnp release, the oneMKL routine behind a call, or the SciPy function to fall back to

Two questions here should never be answered from memory: which linalg and FFT functions the installed release implements (the list grows, and coverage can be per keyword argument) and which oneMKL routine backs a call, which is what explains a numerical difference from NumPy.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Dpnp Linalg Fft?

Linear algebra and FFT with dpnp on Intel CPUs and GPUs, backed by oneMKL. Use when a matrix multiply, solve, decomposition, eigenvalue problem, or Fourier transform is the hot part of NumPy code, when the user asks whether dpnp covers a linalg or FFT call, when an FFT result differs slightly from NumPy's, or when a large transform runs out of device memory. Covers the supported surface, transform sizing and plan reuse, fallbacks for what is missing, and how to check conditioning before solving.

Навіщо використовувати Dpnp Linalg Fft у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Dpnp Linalg Fft — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Dpnp Linalg Fft у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/intel/skills/tree/main/skills/dpnp-linalg-fft. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Dpnp Linalg Fft?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Dpnp Linalg Fft?

Зі скількома забажаєте. У TypingMind ви можете використовувати Dpnp Linalg Fft із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Dpnp Linalg Fft?

Так. На GitHub цю навичку публікує intel за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇