提交 a404d9ab 编写于 作者: Y Yu Yang

Add todo comments

上级 3e812383
...@@ -81,9 +81,11 @@ PYBIND11_PLUGIN(core) { ...@@ -81,9 +81,11 @@ PYBIND11_PLUGIN(core) {
.def("shape", [](pd::Tensor& self) { return pd::vectorize(self.dims()); }) .def("shape", [](pd::Tensor& self) { return pd::vectorize(self.dims()); })
.def("set_float_element", .def("set_float_element",
[](pd::Tensor& self, size_t offset, float f) { [](pd::Tensor& self, size_t offset, float f) {
// TODO(yuyang18): Only support GPU now.
self.data<float>()[offset] = f; self.data<float>()[offset] = f;
}) })
.def("get_float_element", [](pd::Tensor& self, size_t offset) -> float { .def("get_float_element", [](pd::Tensor& self, size_t offset) -> float {
// TODO(yuyang18): Only support GPU now.
return self.data<float>()[offset]; return self.data<float>()[offset];
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册