Shortcuts

Function c10::Warning::set_warning_handler

Function Documentation

void c10::Warning::set_warning_handler(WarningHandler *handler) noexcept(true)

Sets the global warning handler.

This is not thread-safe, so it should generally be called once during initialization or while holding the GIL for programs that use python. User is responsible for keeping the WarningHandler alive until it is not needed.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources