parameters: (info, cc, smem_config=None)
return_statement: return ret
docstring: Returns a dictionary of {threadperblock: occupancy, factor}
  
      Only threadperblock of multiple of warpsize is used.
      Only threadperblock of non-zero occupancy is returned.
docstring_summary: Returns a dictionary of {threadperblock: occupancy, factor}
docstring_tokens: Returns a dictionary of { threadperblock : occupancy factor }
function: def warp_occupancy(info, cc, smem_config=None):
      """Returns a dictionary of {threadperblock: occupancy, factor}
  
      Only threadperblock of multiple of warpsize is used.
      Only threadperblock of non-zero occupancy is returned.
      """
      ret = {}
      try:
          limits = PHYSICAL_LIMITS[cc]
      except KeyError:
          raise ValueError("%s is not a supported compute capability"
                               % ".".join(str(c) for c in cc))
      if smem_config is None:
          smem_config = limits['default_smem_config']
      warpsize = limits['thread_per_warp']
      max_thread = info.maxthreads
  
      for tpb in range(warpsize, max_thread + 1, warpsize):
          result = compute_warp_occupancy(tpb=tpb,
                                          reg=info.regs,
                                          smem=info.shared,
                                          smem_config=smem_config,
                                          limits=limits)
          if result[0]:
              ret[tpb] = result
      return ret
function_tokens: def warp_occupancy ( info , cc , smem_config = None ) : ret = { } try : limits = PHYSICAL_LIMITS [ cc ] except KeyError : raise ValueError ( "%s is not a supported compute capability" % "." . join ( str ( c ) for c in cc ) ) if smem_config is None : smem_config = limits [ 'default_smem_config' ] warpsize = limits [ 'thread_per_warp' ] max_thread = info . maxthreads for tpb in range ( warpsize , max_thread + 1 , warpsize ) : result = compute_warp_occupancy ( tpb = tpb , reg = info . regs , smem = info . shared , smem_config = smem_config , limits = limits ) if result [ 0 ] : ret [ tpb ] = result return ret