Comments (2)
@JAppleyard Hi, why a single matrix multiplication requires 2MN(K+1), I mean, it should be MN(2K-1) right?
from code-samples.
The vast majority of FLOPs in an LSTM are in the matrix multiplications. A single matrix multiplication requires 2MN(K+1) FLOPs. There are 8 matrix multiplications per layer per timestep, and in this case M=K=hiddenSize, N=minibatch. Therefore the total FLOPs are:
layers * timesteps * 8 * 2 * hiddenSize * minibatch * (hiddenSize + 1).
In reality there's a few more FLOPs due to biases and activation functions. These are only significant if hiddenSize is very small as they scale linearly with hiddenSize rather than with the square.
In any case, this will give you the total approximate number of FLOPs. Divide by time and multiply by 10^-12, and you have TFLOPS.
from code-samples.
Related Issues (20)
- submodule is broken
- bandwidthtest.cu shows GB/s, but the math looks like MB/s HOT 1
- ERRORS: in simpleOnnx_*.cpp HOT 3
- simpleTensorCoreGEMM has errors in output when compiled with CUDA10 for Turing GPUs HOT 2
- CUDA-aware runtime error HOT 1
- CUDA-aware MPI example complains about CUDA runtime version HOT 2
- memtype_cache.c:137 UCX WARN destroying inuse address HOT 1
- Getting errors running tensor-cores example HOT 4
- CUDA aware Jacobi examples fail using PGI HOT 1
- [grCUDA] vulnerabiliy issues in packackage dependencies HOT 1
- fatal error: cuda_runtime.h HOT 3
- compile "TensorRT-introduction" HOT 3
- ioHelper.cpp:66:5: error: ‘onnx’ has not been declared HOT 7
- Error in simpleOnnx_1.cpp while running on jetson Nano 4 gb
- error by using cuda-aware-mpi-example, bandwidth was wrong HOT 10
- some questions about unified-memory,dataElem.cu file HOT 1
- Verification Failed on sample for cufft_callbacks
- Can't Detecting CUDA compiler ABI HOT 3
- Cannot reproduce the results on parallel reduce with shfl HOT 7
- tensor core example result mismatch with that of cublas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-samples.