aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-11-23 19:44:57 +0100
committerAndrzej Janik <[email protected]>2020-11-23 20:00:57 +0100
commit0415f873ae15aceda87758f9fcce5d38aa68ca75 (patch)
tree2530ae766a8670f6a79c5cef4c8d9f494e0508a7 /ptx
parentcd141590be847add07b782203b3a348f5bbc232b (diff)
downloadZLUDA-0415f873ae15aceda87758f9fcce5d38aa68ca75.tar.gz
ZLUDA-0415f873ae15aceda87758f9fcce5d38aa68ca75.zip
Throw away useless stuff
Diffstat (limited to 'ptx')
-rw-r--r--ptx/tools/cvt.py36
-rw-r--r--ptx/tools/implicit_ld_dst.py31
-rw-r--r--ptx/tools/implicit_ld_src.py31
3 files changed, 0 insertions, 98 deletions
diff --git a/ptx/tools/cvt.py b/ptx/tools/cvt.py
deleted file mode 100644
index ab6e5ce..0000000
--- a/ptx/tools/cvt.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import os
-import subprocess
-import tempfile
-
-types = ["u8", "u16", "u32", "u64", "s8", "s16", "s32", "s64", "f16", "f32", "f64"]
-rnd = ["", ".rn", ".rni"]
-ftz_all = ["", ".ftz"]
-sat = ["", ".sat"]
-
-for in_type in types:
- for out_type in types:
- for r in rnd:
- for ftz in ftz_all:
- for s in sat:
- with tempfile.TemporaryDirectory() as dir:
- f_name = os.path.join(dir, 'ptx')
- out_name = os.path.join(dir, 'out')
- with open(f_name, 'w') as f:
- f.write(
- f"""
- .version 6.5
- .target sm_30
- .address_size 64
- .visible .entry VecAdd_kernel()
- {{
- .reg.{in_type} r1;
- .reg.{out_type} r2;
- cvt{r}{ftz}{s}.{out_type}.{in_type} r2, r1;
- ret;
- }}
- """)
- err = subprocess.run(f"ptxas {f_name} -o {out_name}", capture_output = True)
- if err.returncode == 0:
- print(f"cvt{r}{ftz}{s}.{out_type}.{in_type}")
- #else:
- # print(f"[INVALID] cvt{r}{ftz}{s}.{out_type}.{in_type}") \ No newline at end of file
diff --git a/ptx/tools/implicit_ld_dst.py b/ptx/tools/implicit_ld_dst.py
deleted file mode 100644
index ea95199..0000000
--- a/ptx/tools/implicit_ld_dst.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import os
-import subprocess
-import tempfile
-
-types = ["b8", "b16", "b32", "b64", "u8", "u16", "u32", "u64", "s8", "s16", "s32", "s64", "f32", "f64"]
-
-for op_type in types:
- for output_type in types:
- with tempfile.TemporaryDirectory() as dir:
- f_name = os.path.join(dir, 'ptx')
- out_name = os.path.join(dir, 'out')
- with open(f_name, 'w') as f:
- f.write(
- f"""
- .version 6.5
- .target sm_30
- .address_size 64
- .visible .entry VecAdd_kernel(
- .param .{op_type} input
- )
- {{
- .reg.{output_type} r1;
- ld.param.{op_type} r1, [input];
- ret;
- }}
- """)
- err = subprocess.run(f"ptxas {f_name} -o {out_name}", capture_output = True)
- if err.returncode == 0:
- print(f"{op_type} {output_type}")
- else:
- print(f"[INVALID] {op_type} {output_type}") \ No newline at end of file
diff --git a/ptx/tools/implicit_ld_src.py b/ptx/tools/implicit_ld_src.py
deleted file mode 100644
index cb6780e..0000000
--- a/ptx/tools/implicit_ld_src.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import os
-import subprocess
-import tempfile
-
-types = ["b8", "b16", "b32", "b64", "u8", "u16", "u32", "u64", "s8", "s16", "s32", "s64", "f32", "f64"]
-
-for input_type in types:
- for op_type in types:
- with tempfile.TemporaryDirectory() as dir:
- f_name = os.path.join(dir, 'ptx')
- out_name = os.path.join(dir, 'out')
- with open(f_name, 'w') as f:
- f.write(
- f"""
- .version 6.5
- .target sm_30
- .address_size 64
- .visible .entry VecAdd_kernel(
- .param .{input_type} input
- )
- {{
- .reg.{op_type} r1;
- ld.param.{op_type} r1, [input];
- ret;
- }}
- """)
- err = subprocess.run(f"ptxas {f_name} -o {out_name}")
- if err.returncode == 0:
- print(f"{op_type} {input_type}")
- else:
- print(f"[INVALID] {op_type} {input_type}") \ No newline at end of file