def kernel(a): from pycuda.cumath import fabs return my_max(fabs(a))
def my_max(vec): from pycuda.gpuarray import max as my_max return my_max(vec).get()