MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / maxBatchSize

Function maxBatchSize

src/scripts/perf/blasPerformanceTesting.py:128–135  ·  view source on GitHub ↗
(lengthx, lengthy, lengthz, exe, device)

Source from the content-addressed store, hash-verified

126 return max_mem_available_in_bytes(exe, device) / (numbers_in_one_datapoint * bytes_in_one_number)
127
128def maxBatchSize(lengthx, lengthy, lengthz, exe, device):
129 problemSize = int(lengthx) * int(lengthy) * int(lengthz)
130 maxBatchSize = max_problem_size(exe, device) / problemSize
131 if int(lengthx) == pow(2,16) or int(lengthx) == pow(2,17):
132 # special cases in the kernel. extra padding is added in, so we need to shrink the batch size to accommodate
133 return str(maxBatchSize/2)
134 else:
135 return str(maxBatchSize)
136
137def create_ini_file_if_requested(args):
138 if args.createIniFilename:

Callers

nothing calls this directly

Calls 1

max_problem_sizeFunction · 0.85

Tested by

no test coverage detected