code: def check_transpose():
      for cls in [NaiveTranspose, SillyTranspose, TransposeWithLocal]:
          print("checking", cls.__name__)
          ctx = cl.create_some_context()
  
          for dev in ctx.devices:
              assert dev.local_mem_size > 0
  
          queue = cl.CommandQueue(ctx)
  
          for i in numpy.arange(10, 13, 0.125):
              size = int(((2**i) // 32) * 32)
              print(size)
  
              source = numpy.random.rand(size, size).astype(
                  numpy.float32
              )
              result = transpose_using_cl(
                  ctx, queue, source, NaiveTranspose
              )
  
              err = source.T - result
              err_norm = la.norm(err)
  
              assert err_norm == 0, (size, err_norm)
  
file_path: pyopencl/examples/transpose.py
imports: import pyopencl
  import numpy
  import numpy.linalg
label_desc: Use image node_id 2 for calling a global function with example usage: check_transpose() without return types