question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This is a tracking issue for problems/enhancements needed with FNet.

So far, @stefan-it @ontocord have mentioned that:

  • --fp16 precision throws an error with the model.

  • It is not possible to keep variable sequence length during training because of the way DFT matrices are initialized (via a config variable).

    • For this @ontocord suggested that we keep different buffers ready. A major drawback to this is that we can’t possibly keep dft matrices for all sequence lengths. However, the values of the DFT matrices vary according to the total sequence length expected.
    • So, one efficient way of handling this is that we can try to create a generic matrix (not DFT) and then modify it on the fly accordingly based on the sequence length.
      • For example, the DFT matrix is defined as: image
        • We can create a matrix without the multiplier, and then on the fly take the portion of the matrix that is needed for the batch, and then multiply with the correct multiplier. Wdyt @patrickvonplaten @sgugger?
        • Or multiply the matrix with sqrt(N)/sqrt(seq_length) and take mat[:seq_length, :seq_length] while multiplying.
  • Need to verify if pushing to GPU pushes everything to the device (including buffers).

I will be adding more issues/problems here as and when they arise.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickvonplatencommented, Dec 10, 2021

Should we implement a buffer solution here? @gchhablani - do you think this makes sense? How big would the buffer be in terms of size?

1reaction
patrickvonplatencommented, Oct 4, 2021

I think if PyTorch doesn’t support --fp16 for the fourier transform, we sadly can’t do much here. Regarding the second point, I think keeping a buffer would indeed be a good solution here!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solving F net = m•a Problems - The Physics Classroom
First you need to know how Fnetrelates to individual force values. The net force is the combined effect of all individual forces. It...
Read more >
Net Force Problems Revisited - The Physics Classroom
If an object is being dragged across a horizontal surface, then there is no vertical acceleration. For this reason, the normal force (Fnorm)...
Read more >
Solving Fnet = m•a Problems - Video - The Physics Classroom
Solving F=m•a problems can be difficult. But give Mr. H 5 minutes of your time and you will approach them with confidence and...
Read more >
F=ma Practice Problems - StickMan Physics
Practice solving for net force, using Newtons second law (F=ma), and relating F=ma to the acceleration equations.
Read more >
Fnet=ma Problems | Wyzant Ask An Expert
Fnet =ma Problems. 1) a 500 kg car is travelling at 15 m/s and experiences a forward engine force of 2000N for 3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found