mirror of https://github.com/Jittor/Jittor
add klo bench
This commit is contained in:
parent
a76c664c65
commit
87489d719e
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.5.40'
|
||||
__version__ = '1.3.5.41'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import jittor as jt
|
||||
|
||||
jt.flags.use_device = 1
|
||||
n = 100000
|
||||
|
||||
with jt.profile_scope(10, 10) as rep:
|
||||
jt.code([2], "float32", [],
|
||||
cuda_header='''__global__ void kernel(float* a) {}''',
|
||||
cuda_src=f'''
|
||||
for (int i=0; i<{n}; i++) kernel<<<1,32>>>(out0_p);
|
||||
''').sync()
|
||||
|
||||
avg_ns = float(rep[1][4]) / n
|
||||
print("kernel launch overhead(ns):", avg_ns)
|
Loading…
Reference in New Issue