aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda_dump
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-01-26 21:05:09 +0100
committerGitHub <[email protected]>2021-01-26 21:05:09 +0100
commit972f612562dc534ad605bfc5a00bc908ddd8b3de (patch)
tree7e4b764357965ab52892dbd79299afa308265710 /zluda_dump
parent3e2e73ac33273fc23a6183b1e5bc0b2f754fa4fb (diff)
downloadZLUDA-972f612562dc534ad605bfc5a00bc908ddd8b3de.tar.gz
ZLUDA-972f612562dc534ad605bfc5a00bc908ddd8b3de.zip
Fix signed integer conversion (#36)
This fixes the last remaining bug preventing end-to-end GeekBench run, so also update Geekbench results in README
Diffstat (limited to 'zluda_dump')
-rw-r--r--zluda_dump/src/replay.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/zluda_dump/src/replay.py b/zluda_dump/src/replay.py
index 07c1780..9c78754 100644
--- a/zluda_dump/src/replay.py
+++ b/zluda_dump/src/replay.py
@@ -50,6 +50,14 @@ def parse_arguments(dump_path, prefix):
arg_files = os.listdir(dir)
return [load_arguments(path.join(dir, f)) for f in sorted(arg_files)]
+
+def append_debug_buffer(args):
+ args = list(args)
+ debug_buff = np.zeros(1024 * 1024, np.single)
+ args.append((drv.InOut(debug_buff), debug_buff))
+ return args
+
+
def verify_single_dump(input_path, max_block_threads):
print(input_path)
kernel_name = path.basename(input_path).split("_", 1)[1]
@@ -58,11 +66,12 @@ def verify_single_dump(input_path, max_block_threads):
block = tuple(launch_lines[3:6])
launch_block_size = block[0] * block[1] * block[2]
if launch_block_size > max_block_threads:
- print(f" Skipping, launch block size ({launch_block_size}) bigger than maximum block size ({max_block_threads})")
+ print(
+ f" Skipping, launch block size ({launch_block_size}) bigger than maximum block size ({max_block_threads})")
return
module = drv.module_from_file(path.join(input_path, "module.ptx"))
kernel = module.get_function(kernel_name)
- pre_args = parse_arguments(input_path, "pre")
+ pre_args = append_debug_buffer(parse_arguments(input_path, "pre"))
kernel_pre_args, host_pre_args = zip(*pre_args)
kernel(*list(kernel_pre_args), grid=tuple(launch_lines[:3]), block=block, shared=launch_lines[6])
post_args = parse_arguments(input_path, "post")
@@ -75,6 +84,7 @@ def verify_single_dump(input_path, max_block_threads):
except Exception as e:
print(f"{idx}: {e}")
+
def main(argv):
device = drv.Device(0)
max_threads = device.get_attribute(drv.device_attribute.MAX_THREADS_PER_BLOCK)