Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`GradScaler` and mixed-precision training

Open
#899 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, pytorch

Research direction

Start with the linked PyTorch AMP examples, focusing on GradScaler and the fp16 gradient-scaling flow. Identify the TorchSharp API surface and tests that cover mixed-precision training; done means fp16 gradient scaling is exposed and verified, with fp8 support considered for the future hardware noted in the issue.

Written by the indexing model from the issue text.

Description

https://pytorch.org/docs/stable/notes/amp_examples.html

Currently, bfloat16 works well without grad scaling. But to use fp16 and fp8 (fp8 - in the future, when the support for Hopper/40XX GPUs lands) one needs to scale gradients.

Dominant language
C#
Stars
1.9k
Forks
228
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/TorchSharp

All issues in dotnet/TorchSharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.