mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-04 18:20:09 +01:00
Work in progress
This commit is contained in:
@@ -4,10 +4,12 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import math
|
import math
|
||||||
import ast
|
import ast
|
||||||
from param import Register, MemAddr
|
|
||||||
from operator import add
|
from operator import add
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
from .param import Register, MemAddr
|
||||||
|
|
||||||
|
|
||||||
class Scheduler(object):
|
class Scheduler(object):
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
from testcase import Testcase
|
from .testcase import Testcase
|
||||||
from param import Register, MemAddr, Parameter
|
from .param import Register, MemAddr, Parameter
|
||||||
|
|
||||||
|
|
||||||
class InstrExtractor(object):
|
class InstrExtractor(object):
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import os
|
|||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
from param import Register, MemAddr, Parameter
|
from .param import Register, MemAddr, Parameter
|
||||||
from eu_sched import Scheduler
|
from .eu_sched import Scheduler
|
||||||
from testcase import Testcase
|
from .testcase import Testcase
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -53,10 +53,10 @@ class Osaca(object):
|
|||||||
# Check args and exit program if something's wrong
|
# Check args and exit program if something's wrong
|
||||||
if(not self.check_arch()):
|
if(not self.check_arch()):
|
||||||
print('Invalid microarchitecture.')
|
print('Invalid microarchitecture.')
|
||||||
sys.exit()
|
sys.exit(1)
|
||||||
if(not self.check_file()):
|
if(not self.check_file()):
|
||||||
print('Invalid file path or file format.')
|
print('Invalid file path or file format.', file=sys.stderr)
|
||||||
sys.exit()
|
sys.exit(1)
|
||||||
# Check for database for the chosen architecture
|
# Check for database for the chosen architecture
|
||||||
self.df = self.read_csv()
|
self.df = self.read_csv()
|
||||||
# Create sequence of numbers and their reciprokals for validate the measurements
|
# Create sequence of numbers and their reciprokals for validate the measurements
|
||||||
@@ -132,10 +132,10 @@ class Osaca(object):
|
|||||||
# Check args and exit program if something's wrong
|
# Check args and exit program if something's wrong
|
||||||
if(not self.check_arch()):
|
if(not self.check_arch()):
|
||||||
print('Invalid microarchitecture.')
|
print('Invalid microarchitecture.')
|
||||||
sys.exit()
|
sys.exit(1)
|
||||||
if(not self.check_elffile()):
|
if(not self.check_elffile()):
|
||||||
print('Invalid file path or file format.')
|
print('Invalid file path or file format.')
|
||||||
sys.exit()
|
sys.exit(1)
|
||||||
# Finally check for database for the chosen architecture
|
# Finally check for database for the chosen architecture
|
||||||
self.read_csv()
|
self.read_csv()
|
||||||
|
|
||||||
@@ -210,9 +210,10 @@ class Osaca(object):
|
|||||||
False if file does not exist or is not an elf64 file
|
False if file does not exist or is not an elf64 file
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
print(self.filepath, os.path.isfile(self.filepath))
|
||||||
if(os.path.isfile(self.filepath)):
|
if(os.path.isfile(self.filepath)):
|
||||||
self.store_src_code_elf()
|
self.store_src_code_elf()
|
||||||
if('file format elf64' in self.srcCode[1]):
|
if('file format elf64' in self.srcCode[1].lower()):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from math import ceil
|
from math import ceil
|
||||||
from param import Register, MemAddr, Parameter
|
from .param import Register, MemAddr, Parameter
|
||||||
|
|
||||||
|
|
||||||
class Testcase(object):
|
class Testcase(object):
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -103,9 +103,6 @@ setup(
|
|||||||
# If there are data files included in your packages that need to be
|
# If there are data files included in your packages that need to be
|
||||||
# installed, specify them here. If using Python 2.6 or less, then these
|
# installed, specify them here. If using Python 2.6 or less, then these
|
||||||
# have to be included in MANIFEST.in as well.
|
# have to be included in MANIFEST.in as well.
|
||||||
package_data={
|
|
||||||
'osaca': ['data/*.csv', 'README.rst', 'LICENSE'],
|
|
||||||
},
|
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
|
||||||
# Although 'package_data' is the preferred approach, in some case you may
|
# Although 'package_data' is the preferred approach, in some case you may
|
||||||
|
|||||||
Reference in New Issue
Block a user