class_docstr: CUTLASSTemplate is a class that provides a template for generating CUTLASS Templates. Used as a baseclass for the
  CUTLASSGemmTemplate, providing functionality that might also be relevant for non-GEMM CUTLASS Kernels.
class_docstr_tok: ["CUTLASSTemplate","is","a","class","that","provides","a","template","for","generating","CUTLASS","Templates",".","Used","as","a","baseclass","for","the","CUTLASSGemmTemplate",",","providing","functionality","that","might","also","be","relevant","for","non-GEMM","CUTLASS","Kernels","."]
code: def globals(self) -> IndentedBuffer:
      res = super().globals()
      res.splice(
          """
                  using namespace cute;
                  #define CUTLASS_CHECK(status)                                                      \\
                  {                                                                                  \\
                    cutlass::Status error = status;                                                  \\
                    if (error != cutlass::Status::kSuccess) {                                        \\
                      auto msg = std::string("[") + __FILE__ + "] Got cutlass error: " +             \\
                          cutlassGetStatusString(error) + " at: " + std::to_string(__LINE__);        \\
                      throw std::runtime_error(msg);                                                 \\
                    }                                                                                \\
                  }
  
                  // Used as pass-through functor in EVT just for type casting / rounding
                  template <typename T>
                  struct identity_op {
                    CUTLASS_HOST_DEVICE
                    T operator()(T val) const { return val; }
                  };
  
              """
      )
      return res
  
imports: import functools
  import itertools
  import logging
  from typing import List, Optional
  from unittest.mock import patch
  import sympy
  import torch
  from ...autotune_process import CUDABenchmarkRequest, TensorMeta
  from ...ir import Buffer, CUDATemplateBuffer, IRNode, Layout
  from ...utils import IndentedBuffer, unique
  from ...virtualized import V
  from ..common import KernelTemplate
  from .cuda_kernel import CUDATemplateCaller, CUDATemplateKernel
label_desc: Use image node_id 2 for calling the CUTLASSTemplate obj's underlying member method code with example usage: obj.globals() and returns: res