code: def test_workgroup():
      mgr = kp.Manager(0)
  
      tensor_a = mgr.tensor(np.zeros([16, 8]))
      tensor_b = mgr.tensor(np.zeros([16, 8]))
  
      @ps.python2shader
      def compute_shader_wg(
          gl_idx=("input", "GlobalInvocationId", ps.ivec3),
          gl_wg_id=("input", "WorkgroupId", ps.ivec3),
          gl_wg_num=("input", "NumWorkgroups", ps.ivec3),
          data1=("buffer", 0, ps.Array(ps.f32)),
          data2=("buffer", 1, ps.Array(ps.f32)),
      ):
          i = gl_wg_id.x * gl_wg_num.y + gl_wg_id.y
          data1[i] = f32(gl_idx.x)
          data2[i] = f32(gl_idx.y)
  
      algo = mgr.algorithm(
          [tensor_a, tensor_b], compute_shader_wg.to_spirv(), (16, 8, 1)
      )
  
      (
          mgr.sequence()
          .record(kp.OpTensorSyncDevice([tensor_a, tensor_b]))
          .record(kp.OpAlgoDispatch(algo))
          .record(kp.OpTensorSyncLocal([tensor_a, tensor_b]))
          .eval()
      )
  
      print(tensor_a.data())
      print(tensor_b.data())
  
      assert np.all(
          tensor_a.data()
          == np.stack([np.arange(16)] * 8, axis=1).ravel()
      )
      assert np.all(
          tensor_b.data()
          == np.stack([np.arange(8)] * 16, axis=0).ravel()
      )
  
file_path: kompute/python/test/test_kompute.py
imports: import os
  import kp
  import numpy
  import logging
  import pyshader
  from .utils import compile_source
label_desc: Use image node_id 6 for calling a global function with example usage: test_workgroup() without return types