KEMBAR78
Regression: Missing Symbols in PyTorch DLL (torch_python) · Issue #148208 · pytorch/pytorch · GitHub
Skip to content

Regression: Missing Symbols in PyTorch DLL (torch_python) #148208

@wschin

Description

@wschin

🐛 Describe the bug

We use some functions in python_arg_parser.h for our backend and those symbols are gone after #136743. In python_arg_parsers.h, you will see inline implementation such as

inline at::Tensor PythonArgs::tensor(int i) {
  if (args[i] && THPVariable_CheckExact(args[i])) {
    return THPVariable_Unpack(args[i]);
  }
  return tensor_slow(i);
}

so functions like tensor_slow needs to be exposed by tagging tensor_slow with TORCH_PYTHON_API. Alternatively, we can try to remove inline and move implementation in cpp file.

Versions

latest main branch can repro.

cc @malfet @zou3519 @xmfan @jbschlosser

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionablemodule: cppRelated to C++ APImodule: cpp-extensionsRelated to torch.utils.cpp_extensiontriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions