Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Python binding of Triton server C API #248

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,25 @@ export(
)

export(PACKAGE TritonCore)

FetchContent_Declare(
pybind11
GIT_REPOSITORY "https://github.com/pybind/pybind11"
# COMMIT ID for v2.10.0
GIT_TAG "aa304c9c7d725ffb9d10af08a3b34cb372307020"
GIT_SHALLOW ON
)
FetchContent_MakeAvailable(pybind11)
set(
PYTHON_BINDING_SRCS
python/binding/tritonserver_pybind.cc
)

pybind11_add_module(triton_bindings SHARED ${PYTHON_BINDING_SRCS})
GuanLuo marked this conversation as resolved.
Show resolved Hide resolved
target_link_libraries(
triton_bindings
PRIVATE
triton-core-serverapi # from repo-core
triton-core-serverstub # from repo-core
)
target_compile_features(triton_bindings PRIVATE cxx_std_17)
1 change: 0 additions & 1 deletion python/_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Tensor:

def __init__(self) -> None:
# tensor metadata
self.data_type: DataType = None
Expand Down
2 changes: 1 addition & 1 deletion python/_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def format(self, f: LogFormat) -> None:
def file(self) -> str:
return self._file

@format.setter
@file.setter
def file(self, f: str) -> None:
# TRITONSERVER_ServerOptionsSetLogFile
self._file = f
Expand Down
Loading
Loading