mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/73867 Fixes https://github.com/pytorch/pytorch/issues/72947 Test Plan: Imported from OSS Reviewed By: davidberard98 Differential Revision: D34695956 Pulled By: anjali411 fbshipit-source-id: 2f3eda272a5214335eae506bd387ce8da4d81b8c (cherry picked from commit fdb07354cac22c30aa047e65fbac9840608db811)
15 lines
458 B
C++
15 lines
458 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/python_headers.h>
|
|
#include <torch/csrc/autograd/python_variable.h>
|
|
|
|
namespace torch { namespace autograd {
|
|
|
|
Py_ssize_t THPVariable_length(PyObject* self);
|
|
PyObject* THPVariable_getitem(PyObject* self, PyObject* index);
|
|
int THPVariable_setitem(PyObject* self, PyObject* index, PyObject* value);
|
|
|
|
Variable valueToTensor(c10::TensorOptions options, PyObject* value, const at::Device& device);
|
|
|
|
}} // namespace torch::autograd
|