parameters: (self)
return_statement: return ptx
docstring: Get PTX for the current active context.
docstring_summary: Get PTX for the current active context.
docstring_tokens: Get PTX for the current active context .
function: def get(self):
          """
          Get PTX for the current active context.
          """
          cuctx = get_context()
          device = cuctx.device
          cc = device.compute_capability
          ptx = self.cache.get(cc)
          if ptx is None:
              arch = nvvm.get_arch_option(*cc)
              ptx = nvvm.llvm_to_ptx(self.llvmir, opt=3, arch=arch,
                                     **self._extra_options)
              self.cache[cc] = ptx
              if config.DUMP_ASSEMBLY:
                  print(("ASSEMBLY %s" % self.name).center(80, '-'))
                  print(ptx.decode('utf-8'))
                  print('=' * 80)
          return ptx
function_tokens: def get ( self ) : cuctx = get_context ( ) device = cuctx . device cc = device . compute_capability ptx = self . cache . get ( cc ) if ptx is None : arch = nvvm . get_arch_option ( * cc ) ptx = nvvm . llvm_to_ptx ( self . llvmir , opt = 3 , arch = arch , * * self . _extra_options ) self . cache [ cc ] = ptx if config . DUMP_ASSEMBLY : print ( ( "ASSEMBLY %s" % self . name ) . center ( 80 , '-' ) ) print ( ptx . decode ( 'utf-8' ) ) print ( '=' * 80 ) return ptx