code: def test_alignment():
      n = tvm.runtime.convert(1024)
      A = te.placeholder((n,), name="A")
      B = te.compute(A.shape, lambda i: A[i] * 3, name="B")
      s = te.create_schedule(B.op)
      bx, tx = s[B].split(B.op.axis[0], factor=8)
      s[B].vectorize(tx)
      f = tvm.build(s, [A, B], "llvm", name="test_alignment")
  
      lines = f.get_source().split("\n")
  
      # Check alignment on load/store.
      for l in lines:
          if "align" in l and "4 x float" in l:
              assert "align 32" in l
  
      # Check parameter alignment. This looks for the definition of the
      # outlined "compute_" function to see if there is an "align" attribute
      # listed there.
      def has_param_alignment():
          for l in lines:
              if re.search(
                  r"test_alignment_compute_\([^(]*align [0-9]", l
              ):
                  return True
          return False
  
      if tvm.target.codegen.llvm_version_major() >= 5:
          assert has_param_alignment()
  
      # Check for assume intrinsics. This isn't 100% accurate, since it just
      # checks if the llvm.assume is there, but detailed check would require
      # a much more detailed analysis of the LLVM IR.
      def has_call_to_assume():
          for l in lines:
              if re.search(r"call.*llvm.assume", l):
                  return True
          return False
  
      assert has_call_to_assume()
  
imports: import collections
  import ctypes
  import json
  import math
  import numpy
  import pytest
  import re
  import sys
  import tvm
  import tvm.testing
  from tvm import te
  from tvm.contrib import clang, utils
  from tvm.relay.backend import Runtime
  from tvm.script import tir, ir
  from tvm.target.codegen import llvm_get_intrinsic_name, llvm_lookup_intrinsic_id
label_desc: Use image node_id 17 for calling a global function with example usage: test_alignment() and returns: False, False, True, True