Tune: Fixed correctness
This commit is contained in:
@@ -96,12 +96,12 @@ def do_tuning(args):
|
|||||||
else:
|
else:
|
||||||
def compute_perf(x, t):
|
def compute_perf(x, t):
|
||||||
return TYPES[operation]['perf-index']([datatype(0).size, x, t])
|
return TYPES[operation]['perf-index']([datatype(0).size, x, t])
|
||||||
#profiles = dataset.sample_profiles(execution_handler, tuning_sizes)
|
profiles = dataset.sample_profiles(execution_handler, tuning_sizes)
|
||||||
if args.build_model:
|
if args.build_model:
|
||||||
#X, Y, profiles = dataset.sample_dataset(prefix, profiles, execution_handler, training_sizes)
|
X, Y, profiles = dataset.sample_dataset(prefix, profiles, execution_handler, training_sizes)
|
||||||
profiles = np.loadtxt(prefix+'/profiles.csv')
|
#profiles = np.loadtxt(prefix+'/profiles.csv')
|
||||||
X = np.loadtxt(prefix+'/X.csv',ndmin=2)
|
#X = np.loadtxt(prefix+'/X.csv',ndmin=2)
|
||||||
Y = np.loadtxt(prefix+'/Y.csv',ndmin=2)
|
#Y = np.loadtxt(prefix+'/Y.csv',ndmin=2)
|
||||||
clf = train_model(X, Y, profiles, compute_perf, TYPES[operation]['perf-measure'])
|
clf = train_model(X, Y, profiles, compute_perf, TYPES[operation]['perf-measure'])
|
||||||
D['predictor'] = [{'children_left': e.tree_.children_left.tolist(),
|
D['predictor'] = [{'children_left': e.tree_.children_left.tolist(),
|
||||||
'children_right': e.tree_.children_right.tolist(),
|
'children_right': e.tree_.children_right.tolist(),
|
||||||
|
@@ -12,10 +12,7 @@ def sample_profiles(execution_handler, generator):
|
|||||||
print x
|
print x
|
||||||
if i==0:
|
if i==0:
|
||||||
X = np.empty((0,len(x)))
|
X = np.empty((0,len(x)))
|
||||||
try:
|
y = execution_handler(x)
|
||||||
y = execution_handler(x)
|
|
||||||
except:
|
|
||||||
continue
|
|
||||||
if y not in profiles:
|
if y not in profiles:
|
||||||
profiles.append(y)
|
profiles.append(y)
|
||||||
idx = profiles.index(y)
|
idx = profiles.index(y)
|
||||||
|
@@ -206,7 +206,7 @@ def skip(template, symbolic):
|
|||||||
return True
|
return True
|
||||||
elif vendor == isc.vendor.NVIDIA and local_size%32!=0:
|
elif vendor == isc.vendor.NVIDIA and local_size%32!=0:
|
||||||
return True
|
return True
|
||||||
elif vendor == isc.vendor.INTEL in vendor and local_size%8!=0:
|
elif vendor == isc.vendor.INTEL and local_size%8!=0:
|
||||||
return True
|
return True
|
||||||
array_expressions = isc.array_expression_container(symbolic)
|
array_expressions = isc.array_expression_container(symbolic)
|
||||||
registers_usage = template.registers_usage(array_expressions)/4
|
registers_usage = template.registers_usage(array_expressions)/4
|
||||||
|
Reference in New Issue
Block a user