Skip to content

Try to fix op benchmark ci in Paddle. #1739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions api/common/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ def run(self, cmd, profile_from_start=False):

def _nvprof(self, cmd, profile_from_start):
if profile_from_start:
profile_cmd = "nvprof {}".format(cmd)
profile_cmd = "nvprof --openacc-profiling off {}".format(cmd)
else:
profile_cmd = "nvprof --profile-from-start off {}".format(cmd)
profile_cmd = "nvprof --profile-from-start off --openacc-profiling off {}".format(
cmd)
return system.run_command(profile_cmd)

def _parse_logs(self, logs):
Expand Down Expand Up @@ -97,10 +98,9 @@ class NsightRunner(object):
def run(self, cmd, profile_from_start=False):
stdout, exit_code = self._nsight(cmd, profile_from_start)
parse_status, gpu_time = self._parse_logs(stdout.split("\n"))
if parse_status:
if parse_status and gpu_time != 0:
return gpu_time
if exit_code == 0:
print("Running Error:\n {}".format(stdout))
print("Running Error:\n {}".format(stdout))
return 0.0

def _nsight(self, cmd, profile_from_start):
Expand Down