Native DirectML crash with torch.nn.PReLU(num_parameters > 1) (dml_tensor_desc.cc:80)

Lasse 20 Zuverlässigkeitspunkte
2026-08-10T18:42:57.06+00:00

Hi everyone,

I've isolated what appears to be a reproducible DirectML backend issue involving channel-wise PReLU.

Environment


Minimal behaviour

CPU:

  • ReLU ✔
  • LeakyReLU ✔
  • SiLU ✔
  • Sigmoid ✔
  • Tanh ✔
  • PReLU(num_parameters=1) ✔
  • PReLU(num_parameters=2) ✔

DirectML:

  • ReLU ✔
  • LeakyReLU ✔
  • SiLU ✔
  • Sigmoid ✔
  • Tanh ✔
  • PReLU(num_parameters=1) ✔
  • PReLU(num_parameters=2) ❌ Native crash

The process aborts with


The crash happens before Python can raise an exception.

Isolation steps

I reproduced this

  • in a completely fresh Python 3.11 virtual environment,
  • without Real-ESRGAN,
  • without my instrumentation framework,
  • using a standalone minimal reproducer.

The crash consistently occurs when switching from a single PReLU parameter to channel-wise PReLU (num_parameters > 1).

Has anyone seen this before?

Is this a known limitation or a regression in torch-directml?

Any insight would be greatly appreciated.Hi everyone,

I've isolated what appears to be a reproducible DirectML backend issue involving channel-wise PReLU.

Environment


Minimal behaviour

CPU:

  • ReLU ✔
  • LeakyReLU ✔
  • SiLU ✔
  • Sigmoid ✔
  • Tanh ✔
  • PReLU(num_parameters=1) ✔
  • PReLU(num_parameters=2) ✔

DirectML:

  • ReLU ✔
  • LeakyReLU ✔
  • SiLU ✔
  • Sigmoid ✔
  • Tanh ✔
  • PReLU(num_parameters=1) ✔
  • PReLU(num_parameters=2) ❌ Native crash

The process aborts with


The crash happens before Python can raise an exception.

Isolation steps

I reproduced this

  • in a completely fresh Python 3.11 virtual environment,
  • without Real-ESRGAN,
  • without my instrumentation framework,
  • using a standalone minimal reproducer.

The crash consistently occurs when switching from a single PReLU parameter to channel-wise PReLU (num_parameters > 1).

Has anyone seen this before?

Is this a known limitation or a regression in torch-directml?

Any insight would be greatly appreciated.DirectML_PReLU_Bug_Report.txt

Entwicklertechnologien | C++
Entwicklertechnologien | C++

Eine hochentwickelte, allgemeine Programmiersprache, die als Erweiterung der Programmiersprache C entwickelt wurde und neben den Möglichkeiten der Speicherbearbeitung auf untergeordneter Ebene auch objektorientierte, generische und funktionale Features bietet.

0 Kommentare Keine Kommentare

1 Antwort

Sortieren nach: Am hilfreichsten
  1. Lasse 20 Zuverlässigkeitspunkte
    2026-08-10T18:44:26.4433333+00:00

    | Component | Version |

    |----------|---------|

    | Windows | 11 |

    | Python | 3.11.9 |

    | torch | 2.4.1+cpu |

    | torchvision | 0.19.1+cpu |

    | torch-directml | 0.2.5.dev240914 |

    | GPU | AMD Radeon RX 9070 XT |

    War diese Antwort hilfreich?

    0 Kommentare Keine Kommentare

Ihre Antwort

Antworten können von Fragestellenden als „Angenommen“ und von Moderierenden als „Empfohlen“ gekennzeichnet werden, wodurch Benutzende wissen, dass diese Antwort das Problem des Fragestellenden gelöst hat.