Skip to content

Commit 634e7c1

Browse files
committed
search code cleanup
git-svn-id: https://svn.mcs.anl.gov/repos/performance/orio@643 e7ad4b5f-b827-0410-872f-f7f4bc3d1efb
1 parent 91138f4 commit 634e7c1

File tree

17 files changed

+4219
-3076
lines changed

17 files changed

+4219
-3076
lines changed

README

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,20 @@ user uses Bash shell, of course).
5858
export PYTHONPATH=$PYTHONPATH:/home/username/lib/python/site-packages
5959
export PATH=$PATH:/home/username/bin
6060

61+
After making sure that the orcc executable is in your path, you can
62+
try some of the examples included in the testsuite subdirectory, e.g.:
63+
64+
> cd testsuite/axpy/simple
65+
> orcc -v axpy5.c
66+
67+
If Orio reports problems building the code, adjust the compiler settings in
68+
the tuning spec included in the axpy5.c.
69+
6170
==================================================================================
6271

6372
CONTACT INFO
6473

6574
Please send all questions, bugs reports, and comments to:
66-
6775
Boyana Norris <[email protected]>
6876

6977

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- clean up testsuite; add more examples of generated code
12
- add an option to enable "best" time to return a list instead of a single value, e.g.,
23
the list ot best times within epsilon of each other, or the top 5%, etc.
34
- in batch systems, submit all jobs and then process results (currently it's one

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
dir_names = rel_dir.split(os.sep)
2020
py_packages.append('.'.join(['orio'] + dir_names[1:]))
2121

22+
print py_packages
23+
2224
#-----------------------------------------------------------
2325

2426
# to remove certain packages not included in the source distribution
@@ -41,7 +43,7 @@
4143

4244
# make a call to the setup function
4345
setup(name = 'orio',
44-
version = '0.2.0',
46+
version = '0.2.2',
4547
description = 'ORIO -- An Annotation-Based Performance Tuning Tool',
4648
author = 'Albert Hartono',
4749
author_email = '[email protected]',
@@ -50,7 +52,7 @@
5052
url = 'https://trac.mcs.anl.gov/projects/performance/wiki/Orio',
5153
packages = py_packages,
5254
package_dir = {'orio' : 'src'},
53-
package_data = {'orio' : ['tool/zestyparser/*']},
55+
#package_data = {'orio' : ['tool/zestyparser/*']},
5456
scripts = ['orcc', 'orf'])
5557

5658

src/main/tspec/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def f_token(p, r, c):
2424
SPEC = Token('spec')
2525

2626
# tokens
27-
ID = Token('[A-Za-z_][A-Za-z0-9_]*', group=0) >> f_token
27+
ID = Token('[A-Za-z_]([A-Za-z0-9_\.]*[A-Za-z0-9_]+)*', group=0) >> f_token
2828
EQUALS = Token('=')
2929
LBRACKET = Token('\[')
3030
RBRACKET = Token('\]')

src/main/tspec/tune_info.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
#--------------------------------------------------------------
88

99
class TuningInfo:
10-
'''Tuning information'''
10+
'''
11+
Tuning information data structure created based on the information in the tuning
12+
specification.
13+
'''
1114

1215
def __init__(self, build_info, pcount_info, search_info, pparam_info, iparam_info,
1316
ivar_info, ptest_code_info):
@@ -61,7 +64,7 @@ def __str__(self):
6164
return repr(self)
6265

6366
def __repr__(self):
64-
'''Return a string representation for this instance'''
67+
'''Return a string representation for this instance (for debugging).'''
6568
s = ''
6669
s += '------------------\n'
6770
s += ' tuning info \n'
@@ -92,8 +95,10 @@ def __repr__(self):
9295
s += ' %s: %s \n' % (id_name, rhs)
9396
s += ' input-variable declarations: \n'
9497
for is_static, dtype, id_name, ddims, rhs in self.ivar_decls:
98+
modifier = 'dynamic'
99+
if is_static: modifier = 'static'
95100
s += (' %s %s %s %s = %s \n' %
96-
('static' if is_static else 'dynamic', dtype, id_name, ddims, rhs))
101+
(modifier, dtype, id_name, ddims, rhs))
97102
s += ' input-variable declaration file: %s \n' % self.ivar_decl_file
98103
s += ' input-variable initialization file: %s \n' % self.ivar_init_file
99104
s += ' performance-test skeleton code file: %s \n' % self.ptest_skeleton_code_file
@@ -469,6 +474,8 @@ def __genInputVarsInfo(self, stmt_seq, def_line_no):
469474
is_array = len(dim_exp_seq) > 0
470475
is_static = 'static' in type_seq
471476
is_dynamic = 'dynamic' in type_seq
477+
# TODO handle structs
478+
472479
if is_static and is_dynamic:
473480
print 'error:%s: a declared variable cannot be both static and dynamic' % line_no
474481
sys.exit(1)

src/main/tuner/ptest_codegen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __genDecls(self, input_decls):
6363
# generate the input variable declarations
6464
decls = []
6565
for is_static, vtype, vname, vdims, rhs in input_decls:
66+
#TODO: handle structs (look for period in vname)
6667
if len(vdims) == 0:
6768
decls.append('%s %s;' % (vtype, vname))
6869
else:

0 commit comments

Comments
 (0)