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

Switch threading model to fork on macOS #8347

Closed
wants to merge 1 commit into from
Closed

Switch threading model to fork on macOS #8347

wants to merge 1 commit into from

Conversation

hogepodge
Copy link
Contributor

This patch switches the threading model on macOS to fork instead
of spawn. It also includes a check that the environment variable
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES to work properly.

This patch switches the threading model on macOS to `fork` instead
of `spawn`. It also includes a check that the environment variable
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES to work properly.
@hogepodge
Copy link
Contributor Author

@leandron @AndrewZhaoLuo following up on our discussion here, https://discuss.tvm.apache.org/t/why-is-auto-tuning-with-resnet-failing-at-task-1, a proposal for updating tvmc to work on macOS.

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this will fix the immediate problem reported. I just wonder whether this shouldn't be fixed at import tvm level, considering the usages via the Python API.

In case there agreement to fix this here, I'm also happy to take this PR.

also cc @comaniac

@leandron leandron self-assigned this Jun 28, 2021
@AndrewZhaoLuo
Copy link
Contributor

AndrewZhaoLuo commented Jun 28, 2021 via email

@hogepodge
Copy link
Contributor Author

Yes, it's my understanding that the appropriate solution is to switch to using methods like POpenWorker, like in this patch. #7889. I'm going to close this PR, but we should continue the discussion.

@hogepodge hogepodge closed this Jun 28, 2021
@AndrewZhaoLuo
Copy link
Contributor

AndrewZhaoLuo commented Jun 28, 2021 via email

@AndrewZhaoLuo
Copy link
Contributor

Ok, so the actual tuning system is built with duct tape, but I think the minimum changes to make this work is actually easier than initially thought:

#8363

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