Skip to content

Commit 244d81f

Browse files
asmigoswochougul
andauthored
Added Cpp Inferencing API to generate the text (quic#156)
* Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <[email protected]> * fixed rasing errors and README Signed-off-by: Onkar Chougule <[email protected]> --------- Signed-off-by: Asmita Goswami <[email protected]> Signed-off-by: Onkar Chougule <[email protected]> Co-authored-by: Onkar Chougule <[email protected]>
1 parent b799c82 commit 244d81f

File tree

4 files changed

+906
-0
lines changed

4 files changed

+906
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# -----------------------------------------------------------------------------
2+
#
3+
# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
# -----------------------------------------------------------------------------
7+
8+
project(InferenceSetIOBuffer)
9+
cmake_minimum_required (VERSION 3.15)
10+
11+
# Find the pybind11 CMake directory using a Python script
12+
execute_process(
13+
COMMAND python -c "import pybind11; print(pybind11.get_cmake_dir())"
14+
OUTPUT_VARIABLE pybind11_DIR
15+
OUTPUT_STRIP_TRAILING_WHITESPACE
16+
)
17+
18+
# Set the CMAKE_PREFIX_PATH to include pybind11
19+
set(CMAKE_PREFIX_PATH ${pybind11_DIR} ${CMAKE_PREFIX_PATH})
20+
set(CMAKE_CXX_STANDARD 17)
21+
find_package(pybind11 REQUIRED)
22+
23+
pybind11_add_module(InferenceSetIOBuffer MODULE InferenceSetIOBuffer.cpp)
24+
25+
26+
include_directories("/opt/qti-aic/dev/inc")
27+
include_directories("examples/cpp_execution")
28+
29+
target_link_libraries(InferenceSetIOBuffer PRIVATE ${PYTHON_LIBRARIES} pybind11::module pthread dl)
30+
31+
target_include_directories(InferenceSetIOBuffer PRIVATE ${PYTHON_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS})
32+
33+
set_target_properties(
34+
InferenceSetIOBuffer
35+
PROPERTIES
36+
LINK_FLAGS "-Wl,--no-as-needed"
37+
)
38+
39+
set(CMAKE_BUILD_TYPE Debug)
40+
41+
target_compile_options(InferenceSetIOBuffer PRIVATE
42+
-fstack-protector-all
43+
-fstack-protector-all
44+
-Werror
45+
-Wall
46+
-Wextra
47+
-Wunused-variable
48+
-Wunused-parameter
49+
-Wnon-virtual-dtor
50+
-Wno-missing-field-initializers)
51+
52+
#Print paths for debugging
53+
message(STATUS "Python Include Dirs: ${PYTHON_INCLUDE_DIRS}")
54+
message(STATUS "Python Include Dirs: ${PYTHON_LIBRARIES}")
55+
message(STATUS "pybind11_DIR: ${pybind11_DIR}")

0 commit comments

Comments
 (0)