Skip to content

Commit

Permalink
updated performance measurement scripts and instruction manual
Browse files Browse the repository at this point in the history
  • Loading branch information
bragadeesh committed Jul 22, 2015
1 parent 1dd01b6 commit 3a2ae95
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 143 deletions.
37 changes: 19 additions & 18 deletions src/scripts/perf/fftPerformanceTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ def executable(library):

if library == 'clFFT' or library == 'null':
if sys.platform == 'win32':
exe = 'Client.exe'
exe = 'clFFT-client-2.5.0.exe'
elif sys.platform == 'linux2':
exe = 'Client'
exe = 'clFFT-client-2.5.0'
elif library == 'cuFFT':
if sys.platform == 'win32':
exe = 'cuFFT-Client.exe'
elif sys.platform == 'linux2':
exe = 'cuFFT-Client'
else:
print 'ERROR: unknown library -- cannot determine executable name'
quit()

if not os.path.isfile(exe):
error_message = 'ERROR: could not find client named ' + exe
print error_message
quit()

return exe

def max_mem_available_in_bytes(exe, device):
Expand All @@ -115,11 +115,8 @@ def max_mem_available_in_bytes(exe, device):
return int(maxMemoryAvailable.group(0))

def max_problem_size(exe, layout, precision, device):
if layout == 'ci' or layout == 'cp':
if layout == 1 or layout == 1:
numbers_in_one_datapoint = 2
else:
print 'max_problem_size(): unknown layout'
quit()

if precision == 'single':
bytes_in_one_number = 4
Expand All @@ -129,18 +126,22 @@ def max_problem_size(exe, layout, precision, device):
print 'max_problem_size(): unknown precision'
quit()

max_problem_size = max_mem_available_in_bytes(exe, device) / (numbers_in_one_datapoint * bytes_in_one_number)
max_problem_size = max_problem_size / 16
max_problem_size = pow(2,25) #max_mem_available_in_bytes(exe, device)
if layout == '5':
max_problem_size = pow(2,24) #max_mem_available_in_bytes(exe, device)
#max_problem_size=max_problem_size/ (numbers_in_one_datapoint * bytes_in_one_number)
#max_problem_size = max_problem_size / 16
return max_problem_size

def maxBatchSize(lengthx, lengthy, lengthz, layout, precision, exe, device):
problemSize = int(lengthx) * int(lengthy) * int(lengthz)
maxBatchSize = max_problem_size(exe, layout, precision, device) / problemSize
if int(lengthx) == pow(2,16) or int(lengthx) == pow(2,17):
# special cases in the kernel. extra padding is added in, so we need to shrink the batch size to accommodate
return str(maxBatchSize/2)
else:
return str(maxBatchSize)
return str(maxBatchSize)
#if int(lengthx) == pow(2,16) or int(lengthx) == pow(2,17):
# # special cases in the kernel. extra padding is added in, so we need to shrink the batch size to accommodate
# return str(maxBatchSize/2)
#else:
# return str(maxBatchSize)

def create_ini_file_if_requested(args):
if args.createIniFilename:
Expand Down
Loading

0 comments on commit 3a2ae95

Please sign in to comment.