'arch --- must be result from get_arch_option()'

def __init__(self, arch):

    if (arch not in self._cache_):
        arch = self._get_closest_arch(arch)
        if (get_libdevice(arch) is None):
            raise RuntimeError(MISSING_LIBDEVICE_FILE_MSG.format(arch=arch))
        self._cache_[arch] = open_libdevice(arch)
    self.arch = arch
    self.bc = self._cache_[arch]
