Skip to content

Commit ce6c720

Browse files
committed
Simplify NTFF profile path to use Spike artifacts directory directly
1 parent 3d3609f commit ce6c720

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

autotune/src/autotune/core/compile.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import importlib.util
66
import inspect
77
import os
8-
import shutil
98
import sys
109
import tempfile
1110
import types
@@ -218,11 +217,7 @@ def run_spike_kernel(
218217
kernel_outputs = spike.run(
219218
spike_kernel, *input_tensors.values(), save_trace=True, artifacts_dir=directory, **kernel_kwargs
220219
)
221-
ntff_file = f"{directory}/{neff_name}.ntff"
222-
profile_ntff = os.path.abspath("./profile.ntff")
223-
if os.path.exists(profile_ntff):
224-
shutil.copy2(profile_ntff, ntff_file)
225-
os.remove(profile_ntff)
220+
ntff_file = os.path.join(directory, "profile.ntff")
226221
if isinstance(kernel_outputs, np.ndarray):
227222
kernel_outputs = tuple([kernel_outputs])
228223
return ntff_file, kernel_outputs

0 commit comments

Comments
 (0)