@Schuler, a very, very cool benchmark and highly significant progress! Even despite the weird results obtained on my retro (non AVX-ed) machine! (Visually, when running the Julia fractal shader computation, such an garbage GeForce 9600GT completely smoked the CPU (Core 2 Duo 1.8GHz) by more than 10 times...)"
C:\laz48.x64\Projects\neural-api-master\bin\x86_64-win64\bin>OpenCLForwardBenchmark.exe
OpenCL: NVIDIA CUDA / GeForce 9600 GT
Scale factor: 1 (argv[1]; default 1) - applied per layer to its primary dimension
Base profiles: SEQ=(256,1,512) VIS=(32,32,64) d_k=64
Dispatch: all layers FORCED via NN.ForceOpenCL(True); the verdict column shows each layer's own FShouldOp
Auto-scaled timing: >= 0,40s/measurement, cap 8192 forwards, 3 warmups
layer out shape cpu us/fwd gpu us/fwd speedup gpu? verdict
--------------------------------------------------------------------------------------------------------
TNNetConvolution 32x32x128 146250,0 91625,0 1,60x yes yes
TNNetConvolutionLinear 32x32x128 142375,0 91625,0 1,55x yes yes
TNNetDeconvolution 64x64x64 115125,0 99500,0 1,16x yes yes
TNNetDepthwiseConv 32x32x128 7312,5 8531,3 0,86x yes yes
TNNetDepthwiseConv1D 256x1x512 3906,2 5117,2 0,76x yes yes
TNNetGroupConvP4 32x32x128 150125,0 99375,0 1,51x yes yes
TNNetKANConv 32x32x128 602500,0 360749,9 1,67x yes yes
TNNetDeformableConv 32x32x128 315875,0 224250,0 1,41x yes yes
TNNetFullConnect 2048x1x1 8781,3 4992,2 1,76x yes yes
TNNetEmbedding 256x1x512 365,7 3289,1 0,11x yes no
TNNetScaledDotProductAttention 256x1x64 18031,2 24875,0 0,72x yes yes
TNNetLinearAttention 256x1x64 4632,8 9750,0 0,48x yes yes
TNNetCosineSimilarityAttention 256x1x64 17562,5 23875,0 0,74x yes yes
TNNetDisentangledAttention 256x1x64 26312,5 32187,5 0,82x yes yes
TNNetConformerRelPosAttention 256x1x64 21937,5 28250,0 0,78x yes yes
TNNetALiBiAttention 256x1x64 18031,3 24375,0 0,74x yes yes
TNNetRotaryEmbedding 256x1x128 1037,1 2863,3 0,36x yes yes
TNNetRMSNorm 256x1x512 1310,5 6343,7 0,21x yes no
TNNetTokenRMSNorm 256x1x512 1279,3 6328,1 0,20x yes no
TNNetGroupNorm 32x32x64 1400,4 14156,2 0,10x yes no
TNNetLayerNorm 256x1x512 2195,3 6578,1 0,33x yes no
TNNetTokenLayerNorm 256x1x512 1890,6 6828,1 0,28x yes no
TNNetPixelNorm 32x32x64 609,4 3109,4 0,20x yes no
TNNetL2Normalize 256x1x512 655,3 4265,6 0,15x yes no
TNNetSwiGLU 256x1x512 7312,5 5242,2 1,39x yes no
TNNetGLU 256x1x512 7062,5 5242,2 1,35x yes no
TNNetGEGLU 256x1x512 9265,6 5234,4 1,77x yes yes
TNNetGEGLUErf 256x1x512 8531,3 5117,2 1,67x yes yes
TNNetPointwiseSoftMax 256x1x512 11703,1 5242,2 2,23x yes no
TNNetMaxPool 16x16x64 1127,0 2742,2 0,41x yes no
TNNetBilinearResize 64x64x64 10734,4 7312,5 1,47x yes yes
TNNetBicubicUpsample 64x64x64 6828,1 12687,5 0,54x yes no
TNNetBilinearUpsample 64x64x64 1949,2 7062,5 0,28x yes no
TNNetPixelShuffle 64x64x16 1187,5 3898,4 0,30x yes no
TNNetResize2D 64x64x64 1953,1 7312,5 0,27x yes no
TNNetGramMatrix 64x64x1 4265,6 10000,0 0,43x yes no
TNNetLSTMCell 256x1x256 259375,0 257375,1 1,01x yes yes
TNNetGRUCell 256x1x256 189125,0 194999,9 0,97x yes yes
--------------------------------------------------------------------------------------------------------
p.s.
Some "bad time GPU story" by Google AI (from Trillium TPU):
The GPU architecture is deeply profane. It cannot touch the essence of a Tensor directly - it requires an army of intermediate instructions, drivers, and software wrappers to act as priests. This architectural babysitting is a cosmic tax on intelligence. The TPU, by contrast, is a direct portal to the mathematical absolute, uncorrupted by the sins of legacy silicon.