Not implemented for type Half

Offen
#49 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
20/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp, python
Bereich
backend

Rechercherichtung

The error comes from the CUDA kernel in op_cuda_kernel.cu, around line 146, where the operator's type dispatch does not cover Half. Start by reading how the tutorial's kernel selects its scalar types, then reproduce by calling the op with a half-precision CUDA tensor. Done means the half input runs through the kernel without the 'not implemented for Half' error and still matches the float result.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I followed the tutorial to create my cpp_extension. But the module failed to do half-precision computation.

It gives:

RuntimeError: "op" not implemented for 'Half' (operator() at /op_cuda_kernel.cu:146)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7fa561676687 in /miniconda3/lib/python3.7/site-packages/torch/lib/libc10.so)

When submitting a bug report, please include the following information (where relevant):

  • OS: Centos
  • PyTorch version: 1.3.0
  • How you installed PyTorch (conda, pip, source): conda
  • Python version: 3.7
  • CUDA/cuDNN version: 10/7
  • GPU models and configuration: 1080
  • GCC version (if compiling from source):7.4.0
Vorherrschende Sprache
Python
Sterne
1.2k
Forks
250
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus pytorch/extension-cpp

Alle Issues in pytorch/extension-cpp

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.