code: def test_type_float():
      shader = """
          #version 450
          layout(set = 0, binding = 0) buffer tensorLhs {float valuesLhs[];};
          layout(set = 0, binding = 1) buffer tensorRhs {float valuesRhs[];};
          layout(set = 0, binding = 2) buffer tensorOutput { float valuesOutput[];};
          layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
  
          void main()
          {
              uint index = gl_GlobalInvocationID.x;
              valuesOutput[index] = valuesLhs[index] * valuesRhs[index];
          }
      """
  
      spirv = compile_source(shader)
  
      arr_in_a = np.array([123.0, 153.0, 231.0], dtype=np.float32)
      arr_in_b = np.array([9482, 1208, 1238], dtype=np.float32)
      arr_out = np.array([0, 0, 0], dtype=np.float32)
  
      mgr = kp.Manager()
  
      tensor_in_a = mgr.tensor(arr_in_a)
      tensor_in_b = mgr.tensor(arr_in_b)
      tensor_out = mgr.tensor(arr_out)
  
      params = [tensor_in_a, tensor_in_b, tensor_out]
  
      (
          mgr.sequence()
          .record(kp.OpTensorSyncDevice(params))
          .record(kp.OpAlgoDispatch(mgr.algorithm(params, spirv)))
          .record(kp.OpTensorSyncLocal([tensor_out]))
          .eval()
      )
  
      assert np.all(tensor_out.data() == arr_in_a * arr_in_b)
  
file_path: kompute/python/test/test_tensor_types.py
imports: import os
  import pytest
  import kp
  import numpy
  from .utils import compile_source
label_desc: Use image node_id 1 for calling a global function with example usage: test_type_float() without return types