diff --git a/scripts/formatting/datastructure_suitesparse.py b/scripts/formatting/datastructure_suitesparse.py index 502a8822..6e89d628 100644 --- a/scripts/formatting/datastructure_suitesparse.py +++ b/scripts/formatting/datastructure_suitesparse.py @@ -139,7 +139,7 @@ def write_datastructure_bench(args, tensor, out_path, tiles=None): vec = vec.toarray().flatten() formatWriter.writeout_separate_vec(vec, dirname, tensorname) elif "mat_vecmul" == args.benchname or "mat_vecmul_ji" in args.benchname: - formatWriter.writeout_separate_sparse_only(coo, dirname, tensorname, format_str="ss10") + formatWriter.writeout_separate_sparse_only(coo, dirname, tensorname, format_str="ss01") if not args.no_gen_other: tensorname = 'c' vec = scipy.sparse.random(shape[1], 1, density=args.density, data_rvs=np.ones) diff --git a/scripts/util/util.py b/scripts/util/util.py index 44d7323c..8332ba1b 100644 --- a/scripts/util/util.py +++ b/scripts/util/util.py @@ -496,7 +496,7 @@ def writeout_separate_vec(self, vec, dir_path, tensorname, format_str="s0", hw=T else: filename = os.path.join(vec_dir, "tensor_" + tensorname + "_mode_0_seg") with open(filename, "w") as ofile: - ofile.write(array_newline_str([0, len(vec_sp) + 1])) + ofile.write(array_newline_str([0, len(vec_sp)])) if not hw: filename = os.path.join(vec_dir, tensorname + "0_crd.txt") @@ -535,7 +535,7 @@ def writeout_separate_vec(self, vec, dir_path, tensorname, format_str="s0", hw=T ofile.write(array_newline_str(vec_shape)) def writeout_separate_sparse_only(self, coo, dir_path, tensorname, format_str="ss01", hw=True): - + if format_str == "ss01": dcsr_dir = Path(dir_path) dcsr_dir.mkdir(parents=True, exist_ok=True, mode=0o777)