Skip to content

Commit

Permalink
tvm_target: rm prints
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Sep 9, 2024
1 parent 40e90fe commit 34e0e5d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mlonmcu/platform/tvm/tvm_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ def exec(self, program, *args, cwd=os.getcwd(), **kwargs):
import numpy as np

data = np.load(self.platform.inputs_artifact, allow_pickle=True)
print("data", data, type(data))
num_inputs = len(data)
ins_file = Path(cwd) / "ins.npz"
outs_file = None
print_top = self.platform.print_top
print("before IF")
if self.platform.get_outputs:
print("IF")
interface = self.platform.get_outputs_interface
if interface == "auto":
if self.supports_filesystem:
Expand All @@ -110,15 +107,11 @@ def exec(self, program, *args, cwd=os.getcwd(), **kwargs):
remaining_inputs = num_inputs
outs_data = []
for idx in range(num_batches):
print("idx", idx)
current_batch_size = max(min(batch_size, remaining_inputs), 1)
assert current_batch_size == 1
if processed_inputs < num_inputs:
print("!!!")
in_data = data[idx]
print("in_data", in_data, type(in_data))
np.savez(ins_file, **in_data)
print("saved!")
processed_inputs += 1
remaining_inputs -= 1
else:
Expand All @@ -127,10 +120,8 @@ def exec(self, program, *args, cwd=os.getcwd(), **kwargs):
program, self, cwd=cwd, ins_file=ins_file, outs_file=outs_file, print_top=print_top
)
ret += ret_
print("self.platform.get_outputs", self.platform.get_outputs)
if self.platform.get_outputs:
interface = self.platform.get_outputs_interface
# print("interface", interface)
if interface == "auto":
if self.supports_filesystem:
interface = "filesystem"
Expand All @@ -147,8 +138,6 @@ def exec(self, program, *args, cwd=os.getcwd(), **kwargs):
raise NotImplementedError
else:
assert False
print("outs_data", outs_data)
# input("$")
if len(outs_data) > 0:
outs_path = Path(cwd) / "outputs.npy"
np.save(outs_path, outs_data)
Expand Down

0 comments on commit 34e0e5d

Please sign in to comment.