"test/vscode:/vscode.git/clone" did not exist on "81424a162c97de616f7ea78a844a5beda8585a08"
Commit 731febb6 authored by wangshaojie6's avatar wangshaojie6
Browse files

add ref conv bwd-weight asm kernels

parent 54b9c729
This diff is collapsed.
This diff is collapsed.
import re import re
NOT_INTLEAVE_S_BARRIER = 0
NOT_INTLEAVE_BUFFER_LOAD = 0
NOT_INTLEAVE_DSWRITE = 0
def read_example_asm_file(asm_file_path): def read_example_asm_file(asm_file_path):
with open(asm_file_path) as f: with open(asm_file_path) as f:
lines = f.readlines() lines = f.readlines()
...@@ -117,6 +121,8 @@ class asm_file_analyser: ...@@ -117,6 +121,8 @@ class asm_file_analyser:
for line in core_loop_txt: for line in core_loop_txt:
if line.find("ds_write2_b64") != -1: if line.find("ds_write2_b64") != -1:
inst_weight_dict[line] = 30 inst_weight_dict[line] = 30
if NOT_INTLEAVE_DSWRITE == 1:
inst_weight_dict[line] = 20
elif line.find("v_mul_lo_u32") != -1: elif line.find("v_mul_lo_u32") != -1:
inst_weight_dict[line] = 8 inst_weight_dict[line] = 8
elif line.find("v_mul_hi_u32") != -1: elif line.find("v_mul_hi_u32") != -1:
...@@ -125,8 +131,12 @@ class asm_file_analyser: ...@@ -125,8 +131,12 @@ class asm_file_analyser:
inst_weight_dict[line] = 56 inst_weight_dict[line] = 56
elif line.find("buffer_load_dword") != -1: elif line.find("buffer_load_dword") != -1:
inst_weight_dict[line] = 30 inst_weight_dict[line] = 30
if NOT_INTLEAVE_BUFFER_LOAD == 1:
inst_weight_dict[line] = 4
elif line.find("s_barrier") != -1: elif line.find("s_barrier") != -1:
inst_weight_dict[line] = 52 inst_weight_dict[line] = 52
if NOT_INTLEAVE_S_BARRIER == 1:
inst_weight_dict[line] = 4
elif line.find(";") != -1: elif line.find(";") != -1:
inst_weight_dict[line] = 0 inst_weight_dict[line] = 0
elif len(line.strip()) == 0: elif len(line.strip()) == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment