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