|
|
|
@@ -329,7 +329,7 @@ class BaseStepTraceParser: |
|
|
|
csv_writer.writerow(self._header) |
|
|
|
for row_data in self._result: |
|
|
|
csv_writer.writerow(row_data) |
|
|
|
os.chmod(self._output_path, stat.S_IREAD) |
|
|
|
os.chmod(self._output_path, stat.S_IRUSR) |
|
|
|
|
|
|
|
|
|
|
|
class GpuStepTraceParser(BaseStepTraceParser): |
|
|
|
@@ -363,7 +363,7 @@ class GpuStepTraceParser(BaseStepTraceParser): |
|
|
|
try: |
|
|
|
with open(output_path, 'w') as json_file: |
|
|
|
json.dump(points, json_file) |
|
|
|
os.chmod(output_path, stat.S_IREAD) |
|
|
|
os.chmod(output_path, stat.S_IRUSR) |
|
|
|
except (IOError, OSError) as err: |
|
|
|
log.warning('Failed to save point info. %s', err) |
|
|
|
raise ProfilerIOException |
|
|
|
@@ -463,7 +463,7 @@ class AscendStepTraceParser(BaseStepTraceParser): |
|
|
|
try: |
|
|
|
with open(output_path, 'w') as json_file: |
|
|
|
json.dump(points, json_file) |
|
|
|
os.chmod(output_path, stat.S_IREAD) |
|
|
|
os.chmod(output_path, stat.S_IRUSR) |
|
|
|
except (IOError, OSError) as err: |
|
|
|
log.warning('Failed to save point info. %s', err) |
|
|
|
raise ProfilerIOException |
|
|
|
|