code: def gen_cpp_files(
      spv_files: Dict[str, str],
      cpp_header_path: str,
      cpp_src_file_path: str,
  ) -> None:
      h = "#pragma once\n"
      h += "#include <ATen/native/vulkan/api/Types.h>\n"
      h += "#include <ATen/native/vulkan/api/vk_api.h>\n"
      h += "#include <string>\n"
      h += "#include <unordered_map>\n"
  
      nsbegin = (
          "namespace at {\nnamespace native {\nnamespace vulkan {\n"
      )
      nsend = "} // namespace vulkan\n} // namespace native\n} // namespace at\n"
  
      anon_ns_begin = "namespace {\n"
      anon_ns_end = "} // namespace\n"
  
      h += nsbegin
  
      # Forward declaration of ShaderInfo
      h += "namespace api {\nstruct ShaderInfo;\n} // namespace api\n"
      h += "typedef std::unordered_map<std::string, api::ShaderInfo> ShaderListing;\n"
      h += "typedef std::unordered_map<std::string, std::string> RegistryKeyMap;\n"
      h += "typedef std::unordered_map<std::string, RegistryKeyMap> ShaderRegistry;\n"
      h += "extern const ShaderListing shader_infos;\n"
      h += "extern ShaderRegistry shader_registry;\n"
      h += "inline const ShaderListing& get_shader_infos() {\n  return shader_infos;\n}\n"
      h += "inline ShaderRegistry& get_shader_registry() {\n  return shader_registry;\n}\n"
  
      h += nsend
  
      cpp = "#include <ATen/native/vulkan/api/Shader.h>\n"
      cpp += f"#include <ATen/native/vulkan/{CPP_H_NAME}>\n"
      cpp += "#include <stdint.h>\n"
      cpp += "#include <vector>\n"
      cpp += nsbegin
  
      shader_info_bin_code = []
      shader_info_cpp_code = []
      shader_info_registry_code = []
  
      for spvPath, srcPath in spv_files.items():
          name = getName(spvPath).replace("_spv", "")
  
          with open(spvPath, "rb") as fr:
              next_bin = array.array("I", fr.read())
              sizeBytes = 4 * len(next_bin)
              shader_info_bin_code.append(
                  "const uint32_t {}_bin[] = {{\n{}\n}};".format(
                      name,
                      textwrap.indent(
                          ",\n".join(str(x) for x in next_bin), "  "
                      ),
                  ),
              )
  
          shader_info = getShaderInfo(srcPath)
  
          tile_size = (
              f"{{{', '.join(str(x) for x in shader_info.tile_size)}}}"
              if (len(shader_info.tile_size) > 0)
              else "std::vector<uint32_t>()"
          )
  
          shader_info_layouts = "{{{}}}".format(
              ",\n ".join(shader_info.layouts)
          )
  
          shader_info_args = [
              f'"vulkan.{name}"',
              f"{name}_bin",
              str(sizeBytes),
              shader_info_layouts,
              tile_size,
              storageTypeToEnum[shader_info.weight_storage_type],
              storageTypeToEnum[shader_info.bias_storage_type],
          ]
  
          shader_info_cpp_code.append(
              textwrap.indent(
                  '{{"{}",\n api::ShaderInfo(\n{})}}'.format(
                      name,
                      textwrap.indent(
                          ",\n".join(shader_info_args), "     "
                      ),
                  ),
                  "    ",
              ),
          )
  
          if shader_info.register_for is not None:
              (op_name, registry_keys) = shader_info.register_for
              for registry_key in registry_keys:
                  shader_info_registry_code.append(
                      textwrap.indent(
                          f'{{"{op_name}", {{{{"{registry_key}", "{name}"}}}}}}',
                          "        ",
                      ),
                  )
  
      cpp += anon_ns_begin
      cpp += "\n".join(shader_info_bin_code) + "\n"
      cpp += anon_ns_end
  
      cpp += "const ShaderListing shader_infos = {{\n{}}};\n".format(
          ",\n".join(shader_info_cpp_code),
      )
      cpp += "ShaderRegistry shader_registry = {{\n{}}};\n".format(
          ",\n".join(shader_info_registry_code),
      )
      cpp += nsend
  
      with open(cpp_header_path, "w") as fw:
          fw.write(h)
      with open(cpp_src_file_path, "w") as fw:
          fw.write(cpp)
  
imports: import argparse
  import array
  import codecs
  import copy
  import glob
  import io
  import os
  import re
  import sys
  from itertools import product
  import subprocess
  import textwrap
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Set, Tuple, Union
  import yaml
  from yaml.constructor import ConstructorError
  from yaml.nodes import MappingNode
label_desc: Use image node_id 17 for calling a global function with example usage: gen_cpp_files(spv_files, cpp_header_path, cpp_src_file_path) without return types