'Get PTX for the current active context.'

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
