Skip to content
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

Add argument to enable/disable endpoint error handling in benchmarks #1007

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 10 additions & 2 deletions ucp/benchmarks/backends/ucp_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ async def server_handler(ep):
await ep.close()
lf.close()

lf = ucp.create_listener(server_handler, port=self.args.port)
lf = ucp.create_listener(
server_handler,
port=self.args.port,
endpoint_error_handling=self.args.error_handling,
)
self.queue.put(lf.port)

while not lf.closed():
Expand Down Expand Up @@ -114,7 +118,11 @@ async def run(self):

register_am_allocators(self.args)

ep = await ucp.create_endpoint(self.server_address, self.port)
ep = await ucp.create_endpoint(
self.server_address,
self.port,
endpoint_error_handling=self.args.error_handling,
)

if self.args.enable_am:
msg = xp.arange(self.args.n_bytes, dtype="u1")
Expand Down
4 changes: 2 additions & 2 deletions ucp/benchmarks/backends/ucp_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _listener_handler(conn_request, msg):
self.ep = ucx_api.UCXEndpoint.create_from_conn_request(
worker,
conn_request,
endpoint_error_handling=True,
endpoint_error_handling=self.args.error_handling,
)

# Wireup before starting to transfer data
Expand Down Expand Up @@ -229,7 +229,7 @@ def run(self):
worker,
self.server_address,
self.port,
endpoint_error_handling=True,
endpoint_error_handling=self.args.error_handling,
)

send_msg = xp.arange(self.args.n_bytes, dtype="u1")
Expand Down
6 changes: 6 additions & 0 deletions ucp/benchmarks/send_recv.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ def parse_args():
help="Only applies to 'ucp-core' backend: number of maximum outstanding "
"operations, see --delay-progress. (Default: 32)",
)
parser.add_argument(
"--error-handling",
action=argparse.BooleanOptionalAction,
default=True,
help="Disable endpoint error handling.",
pentschev marked this conversation as resolved.
Show resolved Hide resolved
)

args = parser.parse_args()

Expand Down