Skip to content

Set subprocess to no use fork #1971

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
Jan 18, 2025
Merged

Conversation

oleksandr-pavlyk
Copy link
Contributor

This PR modified initialization of dpctl to set subprocess to not use FORK, but use SPAWN to launch subprocesses on Linux.

This is a tentative fix to allows oneapi-gdb to debug kernels submitted by Python applications.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Jan 16, 2025

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@coveralls
Copy link
Collaborator

coveralls commented Jan 16, 2025

Coverage Status

Changes unknown
when pulling af3347a on set-subprocess-to-no-use-fork
into ** on master**.

@ndgrigorian
Copy link
Collaborator

@oleksandr-pavlyk
Was this meant to be on top of the no coverage branch with PR currently open?

@oleksandr-pavlyk
Copy link
Contributor Author

@oleksandr-pavlyk Was this meant to be on top of the no coverage branch with PR currently open?

Yes, the intent was that this be rebased after the PR for no-coverage is merged to eliminate duplicate commits

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the set-subprocess-to-no-use-fork branch from 3b0b506 to 1985406 Compare January 17, 2025 02:34
Fork is not supported by DPC++ runtime. Attempt to use fork may
cause hangs, or incorrect behavior. In particular, it may affect
working on oneapi-gdb.

To enable smooth experience in debugging kernels launched by
dpctl, or extensions built using dpctl C++ API, initialization
of dpctl on Linux, imports subprocess and sets its configuration
variables to use SPAWN over FORK

https://docs.python.org/3/library/subprocess.html#disabling-use-of-vfork-or-posix-spawn
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the set-subprocess-to-no-use-fork branch from 1985406 to af3347a Compare January 17, 2025 03:09
Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310h93fe807_485 ran successfully.
Passed: 894
Failed: 2
Skipped: 118

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310h93fe807_480 ran successfully.
Passed: 894
Failed: 2
Skipped: 118

@oleksandr-pavlyk oleksandr-pavlyk merged commit f730de1 into master Jan 18, 2025
48 of 61 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the set-subprocess-to-no-use-fork branch January 18, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants