rtqichen / torchdiffeq

Differentiable ODE solvers with full GPU support and O(1)-memory backpropagation.
MIT License
5.61k stars 930 forks source link

"nextafter_cuda" not implemented for 'Half' #255

Open maxin-cn opened 1 month ago

maxin-cn commented 1 month ago

When I use half-precision reasoning, I encounter this problem, how can I solve it? Thanks~

./torchdiffeq/_impl/misc.py", line 193, in forward
    t = _nextafter(t, t - 1)
        ^^^^^^^^^^^^^^^^^^^^
  ./torchdiffeq/_impl/misc.py", line 361, in _nextafter
    out = torch.nextafter(x1, x2)
          ^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "nextafter_cuda" not implemented for 'Half'