Skip to content

Commit f5e1c9a

Browse files
authored
Expose Tensor dims (triton-inference-server#176)
* Expose Tensor dims * Use shape instead of dims to be consistent with numpy
1 parent 3670d94 commit f5e1c9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pb_stub.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ PYBIND11_EMBEDDED_MODULE(c_python_backend_utils, module)
911911
.def("triton_dtype", &PbTensor::TritonDtype)
912912
.def("to_dlpack", &PbTensor::ToDLPack)
913913
.def("is_cpu", &PbTensor::IsCPU)
914+
.def("shape", &PbTensor::Dims)
914915
.def("from_dlpack", &PbTensor::FromDLPack);
915916

916917
py::class_<InferResponse, std::shared_ptr<InferResponse>>(

0 commit comments

Comments
 (0)