Skip to content

torch.set_num_threads broken #81

@colesbury

Description

@colesbury

Two problems:

  1. The Python extension is compiled without OpenMP support even though TH is built with it, so set_num_threads is incorrectly a no-op / warning
  2. Python is complaining about the return value
>>> torch.set_num_threads(1)
__main__:1: RuntimeWarning: set_num_threads is a no-op - torch was compiled without OpenMP support
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: <built-in function set_num_threads> returned NULL without setting an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions