Ejemplo n.º 1
0
def verifyReposFromFile(sassname, reposfile, arch='sm_75'):

    # initialize a feeder with sass
    feeder = CuInsFeeder(sassname, arch=arch)

    # initialize an empty repos
    repos = CuInsAssemblerRepos(reposfile, arch=arch)#

    # verify the repos
    repos.verify(feeder)
Ejemplo n.º 2
0
def constructReposFromFile(sassname, savname=None, arch='sm_75'):
    # initialize a feeder with sass
    feeder = CuInsFeeder(sassname, arch=arch)

    # initialize an empty repos
    repos = CuInsAssemblerRepos(arch=arch)#

    # Update the repos with instructions from feeder
    repos.update(feeder)

    # reset the feeder back to start
    feeder.restart()

    # verify the repos
    # actually the codes is already verifed during repos construction
    repos.verify(feeder)

    if savname is not None:
        repos.save2file(savname)

    return repos
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-

from CuAsm.CuInsAssemblerRepos import CuInsAssemblerRepos
from CuAsm.CuInsFeeder import CuInsFeeder

sassname = 'G:\\Temp\\cudnn64_7.sm_50.sass'
# initialize a feeder with sass
feeder = CuInsFeeder(sassname, arch='sm_50')

# initialize an empty repos
repos = CuInsAssemblerRepos(arch='sm_50')

# Update the repos with instructions from feeder
repos.update(feeder)

# reset the feeder back to start
feeder.restart()

# verify the repos
# actually the codes is already verifed during repos construction
repos.verify(feeder)
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-

from CuAsm.CuInsAssemblerRepos import CuInsAssemblerRepos
from CuAsm.CuInsFeeder import CuInsFeeder


if __name__ == '__main__':
    sassname = r'G:\Repos\Tests\Programs\cudatest.sm_75.sass'
    #sassname = r"G:\Temp\cudnn64_7.sm_50.sass"
    reposfile = r'G:\Repos\CuAsm\InsAsmRepos\CuInsAsmRepos.sm_75.txt'
    repos = CuInsAssemblerRepos(reposfile)


    reposfile2 = r'G:\Repos\CuInsAsmRepos.sm_75.txt'
    repos.merge(reposfile2)

    repos.completePredCodes()
    repos.save2file(r'G:\Repos\new.sm_75.txt')