Skip to content
Discussion options

You must be logged in to vote

Hello @darekwojciechowski, thanks a lot for your answer. It helped me to pinpoint the root cause of the performance issue.

TL;DR: Everything is fine with Debian packages, after switching to OpenMP-enabled OpenBLAS (see below for details).

I tried the small benchmark you suggested:

$ cat mm_test.py 
#!/usr/bin/env python3

import time, torch

print(f"Will attempt to run with {torch.get_num_threads()} threads",
      flush=True)

a = torch.randn(4096, 4096)
b = torch.randn(4096, 4096)
torch.mm(a, b)

t0 = time.perf_counter()
for _ in range(5):
    torch.mm(a, b)
dt = (time.perf_counter() - t0)/5
print(f"{dt*1000:.0f} ms   {2*4096**3/dt/1e9:.0f} GFLOP/s")

I ran this benchmark with the Debia…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@frx-wintermute
Comment options

Answer selected by frx-wintermute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants