Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark fp8 script #9

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Add benchmark fp8 script #9

merged 3 commits into from
Dec 18, 2023

Conversation

drisspg
Copy link
Owner

@drisspg drisspg commented Dec 18, 2023

100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [02:29<00:00,  4.67s/it]
   numel  high_precision_dtype    low_precision_dtype    saturated      triton_time    pytorch_time    compiled_pytorch_time
--------  ----------------------  ---------------------  -----------  -------------  --------------  -----------------------
 2097152  torch.bfloat16          torch.float8_e4m3fn    True               39.4022         59.9545                  75.0129
 2097152  torch.bfloat16          torch.float8_e4m3fn    False              39.193          27.1596                  29.506
 2097152  torch.bfloat16          torch.float8_e5m2      True               39.1569         60.187                   79.2593
 2097152  torch.bfloat16          torch.float8_e5m2      False              38.8475         27.2665                  29.2743
 2097152  torch.float32           torch.float8_e4m3fn    True               39.8845         59.7176                  69.8467
 2097152  torch.float32           torch.float8_e4m3fn    False              38.8206         25.6547                  30.5112
 2097152  torch.float32           torch.float8_e5m2      True               39.5862         60.5091                  69.3323
 2097152  torch.float32           torch.float8_e5m2      False              39.2996         25.6836                  30.4653
 4194304  torch.bfloat16          torch.float8_e4m3fn    True               39.5744         89.2462                  89.2371
 4194304  torch.bfloat16          torch.float8_e4m3fn    False              39.4241         44.5693                  44.5856
 4194304  torch.bfloat16          torch.float8_e5m2      True               39.5765         89.2892                  89.3438
 4194304  torch.bfloat16          torch.float8_e5m2      False              39.51           45.5271                  45.5449
 4194304  torch.float32           torch.float8_e4m3fn    True               39.0992         88.103                   88.1655
 4194304  torch.float32           torch.float8_e4m3fn    False              38.7692         43.3739                  43.3968
 4194304  torch.float32           torch.float8_e5m2      True               39.4078         88.1485                  88.1937
 4194304  torch.float32           torch.float8_e5m2      False              39.0674         44.4441                  44.4622
 8388608  torch.bfloat16          torch.float8_e4m3fn    True               38.9665        201.205                  201.236
 8388608  torch.bfloat16          torch.float8_e4m3fn    False              38.6342         98.2023                  98.2161
 8388608  torch.bfloat16          torch.float8_e5m2      True               39.0337        201.23                   201.231
 8388608  torch.bfloat16          torch.float8_e5m2      False              38.9622         99.2762                  99.3148
 8388608  torch.float32           torch.float8_e4m3fn    True               39.4607        206.298                  206.345
 8388608  torch.float32           torch.float8_e4m3fn    False              38.7217         98.8632                  98.9315
 8388608  torch.float32           torch.float8_e5m2      True               38.9956        206.25                   206.253
 8388608  torch.float32           torch.float8_e5m2      False              38.9852         99.7639                  99.8383
16777216  torch.bfloat16          torch.float8_e4m3fn    True               39.6764        456.835                  456.883
16777216  torch.bfloat16          torch.float8_e4m3fn    False              38.617         217.268                  217.277
16777216  torch.bfloat16          torch.float8_e5m2      True               39.1838        456.872                  456.897
16777216  torch.bfloat16          torch.float8_e5m2      False              38.7144        218.301                  218.347
16777216  torch.float32           torch.float8_e4m3fn    True               43.0035        457.834                  457.869
16777216  torch.float32           torch.float8_e4m3fn    False              42.993         214.077                  214.139
16777216  torch.float32           torch.float8_e5m2      True               42.9996        457.954                  458.012
16777216  torch.float32           torch.float8_e5m2      False              42.9937        215.222                  215.239

@drisspg drisspg merged commit 620770b into main Dec 18, 2023
1 check failed
drisspg added a commit that referenced this pull request Dec 18, 2023
* working

* add torch_compile reference

* compile is annoying to microbenchmark, skipping for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant