am: add allocation bench (#10135)

* init allocation bench

* sorryg

* betetr
This commit is contained in:
nimlgen 2025-05-02 13:51:07 +03:00 committed by GitHub
commit 45bf7c5b81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,9 @@
from tinygrad.helpers import Profiling
from tinygrad import Device
if __name__ == "__main__":
am = Device["AMD"]
# kfd is 0.55ms!
with Profiling("allocation 127.7mb"):
am.allocator.alloc(int(127.7*1024*1024))