Exemplo n.º 1
0
 def test_heterogsys_detailed(self):
     workload_xmlfile = os.path.join(
         os.path.dirname(lumos.model.workload.__file__), 'sirius.xml')
     _ks, _as = load_kernels_and_apps(workload_xmlfile)
     app = _as['synapp_0']
     sysconfig = SysConfigDetailed()
     sys = HeterogSysDetailed(sysconfig, _ks)
     self.assertAlmostEqual(sys.perf(650, app), 124.692, places=2)
Exemplo n.º 2
0
    def test_homogsys_detailed(self):
        _ks, _as = load_kernels_and_apps(
            os.path.join(os.path.dirname(__file__), 'detailed_workload.xml'))
        app = _as['l1m0.005_l2m0.01_rm0.18_alpha0.5_cpi0.5']
        sysconfig = SysConfigDetailed()
        sys = HomogSysDetailed(sysconfig)

        # test perf score
        self.assertAlmostEqual(sys.perf(650, app), 992.02310514)
Exemplo n.º 3
0
    def test_homog_vs_heterog_detailed(self):
        workload_xmlfile = os.path.join(
            os.path.dirname(lumos.model.workload.__file__), 'sirius.xml')
        _ks, _as = load_kernels_and_apps(workload_xmlfile)
        app = _as['synapp_0']

        hetsys = HetSys(HetSysConfig(), _ks)
        homsys = HomSys(HomSysConfig())
        self.assertAlmostEqual(hetsys.perf(650, app),
                               homsys.perf(650, app),
                               places=2)
Exemplo n.º 4
0
 def test_reconfig_overhead(self):
     workload_xmlfile = os.path.join(
         os.path.dirname(lumos.model.workload.__file__), 'sirius.xml')
     _ks, _as = load_kernels_and_apps(workload_xmlfile)
     app = _as['synapp_reconfig_overhead_0']
     sysconfig = SysConfigDetailed()
     sysconfig.rlacc_area_ratio = 0.2
     sys = HeterogSysDetailed(sysconfig, _ks)
     self.assertAlmostEqual(sys.perf(750, app), 1083.076, places=2)
     app = _as['synapp_reconfig_overhead_1']
     self.assertAlmostEqual(sys.perf(750, app), 766.22, places=2)
     app = _as['synapp_reconfig_overhead_2']
     self.assertAlmostEqual(sys.perf(750, app), 686.615, places=2)
     app = _as['synapp_reconfig_overhead_3']
     self.assertAlmostEqual(sys.perf(750, app), 686.615, places=2)
Exemplo n.º 5
0
    def test_homog_vs_heterog_detailed2(self):
        workload_xmlfile = os.path.join(
            os.path.dirname(lumos.model.workload.__file__), 'sirius.xml')
        _ks, _as = load_kernels_and_apps(workload_xmlfile)
        app = _as['synapp_0']

        config = HetSysConfig()
        config.rlacc_area_ratio = 0.2
        hetsys = HetSys(config, _ks)

        config2 = HomSysConfig()
        config2.budget = Budget(power=config.budget.power,
                                area=config.budget.area * 0.8)
        homsys = HomSys(config2)
        self.assertAlmostEqual(hetsys.perf(650,
                                           app,
                                           disable_rlacc=True),
                               homsys.perf(650, app),
                               places=2)
Exemplo n.º 6
0
from lumos.model.system.hetero import HeterogSysDetailed,SysConfigDetailed
from lumos.model.system.budget import Budget, Sys_L
from lumos.model.workload import load_kernels_and_apps


# In[4]:

sysconfig = SysConfigDetailed()
sysconfig.tech = 22
sysconfig.rlacc_area_ratio=0.2
sysconfig.add_asacc('regex', 'asic_5x', 0.03) # regex should be accelerated by FPGA
sysconfig.add_asacc('fd', 'asic_10x', 0.03) # fd should be accelerated by ASIC
#sysconfig.delay_l1 = 0
# sysconfig.budget = Budget(area=200, power=60)
ks, apps = load_kernels_and_apps('../../workloads/sirius_synapp_nonkernel0.01.xml')


# In[5]:

sys = HeterogSysDetailed(sysconfig, ks)


# In[6]:

# for vdd in (500,550,600,650, 700, 750, 800):
vdd = 650
print(sys.perf(vdd, apps['app_0']))
print(sys.thru_core.perfnom)

Exemplo n.º 7
0
# In[3]:

sysconfig = SysConfigDetailed()
#sysconfig.delay_l1 = 0
sysconfig.budget = Budget(area=200, power=60)


# In[4]:

sys = HomoSysDetailed(sysconfig)


# In[5]:

from lumos.model.workload import load_kernels_and_apps


# In[6]:

ks, apps = load_kernels_and_apps('detailed_workload_syn.xml')

for vdd in (500,550,600,650, 700, 750, 800):
    print(sys.perf(vdd, apps['l1m0.1_l2m0.5_rm0.32_alpha2.0_cpi1.1'])/sys.core.perfnom)


# In[ ]:



Exemplo n.º 8
0
from lumos.model.system.budget import Budget
from collections import defaultdict
import itertools

results = defaultdict(list)

l1_miss_list = ('0.005', '0.01', '0.05', '0.1')
l2_miss_list = ('0.01', '0.05', '0.1', '0.2', '0.5', '0.6')
rm_list = ('0.18', '0.2', '0.22', '0.24', '0.26', '0.28', '0.3', '0.32')
alpha_list = ('0.5', '1.0', '1.5', '2.0')
cpi_list = ('0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1') 
vdd_list = (500, 550, 600, 650, 700, 750, 800)
area_list = (200, 150, 100)
power_list = (120, 90, 60) 
from lumos.model.workload import load_kernels_and_apps
kernels, apps = load_kernels_and_apps('detailed_workload_syn.xml')
for area, power in itertools.product(area_list, power_list):
    sysconfig = SysConfigDetailed()
    sysconfig.budget = Budget(area=area, power=power)
    sys = HomoSysDetailed(sysconfig)
    for vdd, l1m, l2m, rm, alpha, cpi in itertools.product(vdd_list, l1_miss_list, l2_miss_list, rm_list, alpha_list, cpi_list):
        appname = 'l1m{0}_l2m{1}_rm{2}_alpha{3}_cpi{4}'.format(l1m, l2m, rm, alpha, cpi) 
        results['area'].append(area)
        results['power'].append(power)
        results['vdd'].append(vdd)
        results['l1m'].append(l1m)
        results['l2m'].append(l2m)
        results['rm'].append(rm)
        results['alpha'].append(alpha)
        results['cpi'].append(cpi)
        results['speedup'].append(sys.perf(vdd, apps[appname])/sys.core.perfnom)
Exemplo n.º 9
0
    def setUp(self):

        self.ks_, self.as_ = load_kernels_and_apps(
            os.path.join(os.path.dirname(__file__), 'appdag.xml'))
Exemplo n.º 10
0
from lumos.model.system.hetero import HeterogSysDetailed, SysConfigDetailed
from lumos.model.system.budget import Budget, Sys_L
from lumos.model.workload import load_kernels_and_apps

# In[4]:

sysconfig = SysConfigDetailed()
sysconfig.tech = 22
sysconfig.rlacc_area_ratio = 0.2
sysconfig.add_asacc('regex', 'asic_5x',
                    0.03)  # regex should be accelerated by FPGA
sysconfig.add_asacc('fd', 'asic_10x', 0.03)  # fd should be accelerated by ASIC
#sysconfig.delay_l1 = 0
# sysconfig.budget = Budget(area=200, power=60)
ks, apps = load_kernels_and_apps(
    '../../workloads/sirius_synapp_nonkernel0.01.xml')

# In[5]:

sys = HeterogSysDetailed(sysconfig, ks)

# In[6]:

# for vdd in (500,550,600,650, 700, 750, 800):
vdd = 650
print(sys.perf(vdd, apps['app_0']))
print(sys.thru_core.perfnom)

# In[ ]:
Exemplo n.º 11
0
    def setUp(self):

        self.ks_, self.as_ = load_kernels_and_apps(
            os.path.join(os.path.dirname(__file__), 'appdag.xml'))
Exemplo n.º 12
0
                    'for ASIC performance ratio, default: %(default)s')
parser.add_argument('--coreonly-coverage',
                    default='random',
                    help='coverage of the coreonly kernel, default: %(default)s')
args = parser.parse_args()

if args.nkernels_in_app_std != 0:
    print('Non-zero nkernels-in-app-std not supported yet')
    sys.exit(1)

if args.nkernels_in_app_mean > args.nkernels:
    print('nkernels-in-app-mean is larger than nkernels')
    sys.exit(1)

sirius_original = os.path.join(os.path.dirname(__file__), 'sirius.xml')
origin_kernels, origina_apps = load_kernels_and_apps(sirius_original)

fpga_perfs = [_.get_kernel_param('fpga').perf for _ in origin_kernels.values()
              if _.name != "coreonly"]
fpga_perf_max = max(fpga_perfs)
fpga_perf_min = min(fpga_perfs)
kernel_perfs = numpy.linspace(fpga_perf_min, fpga_perf_max, args.nkernels)

_file_description_ = """
Workload generated by synapps_from_sirius.py

- The script reads kernel characteristics from {0};
- Number of kernels: {1};
- Number of applications: {2};
- Coverage precision: 1e-{3};
- Non-kernel coverage: {4}e-{3};
Exemplo n.º 13
0
 def setUp(self):
     self._ks, self._as = load_kernels_and_apps(os.path.join(curdir, 'appdag.xml'))
     self._app = self._as['app_dag0']