Skip to content

Commit

Permalink
Merge branch 'main' of github.com:IITH-Compilers/MLCompilerBridge int…
Browse files Browse the repository at this point in the history
…o mlbridge-test
  • Loading branch information
RajivChitale committed Feb 5, 2024
2 parents af655fb + 9ad1792 commit 289c68d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ if(LLVM_MLBRIDGE)

LINK_LIBS
ModelRunnerLib
$<TARGET_OBJECTS:SerDesLib>
tf_xla_runtime
protobuf::libprotobuf
SerDesLib
)

target_include_directories(LLVMMLBridge SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS} ${TENSORFLOW_AOT_PATH}/include)
Expand All @@ -72,7 +70,7 @@ else()
llvm_map_components_to_libnames(llvm_libs support core irreader analysis TransformUtils)

add_library(MLCompilerBridge STATIC tools.cpp)
target_link_libraries(MLCompilerBridge PUBLIC SerDesLib ModelRunnerLib ONNXModelRunnerLib ${llvm_libs} tf_xla_runtime protobuf::libprotobuf)
target_link_libraries(MLCompilerBridge PUBLIC SerDesLib ModelRunnerLib ONNXModelRunnerLib ${llvm_libs})
set_target_properties(MLCompilerBridge PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set_property(TARGET MLCompilerBridge PROPERTY POSITION_INDEPENDENT_CODE 1)
install(TARGETS MLCompilerBridge DESTINATION lib)
Expand Down
2 changes: 1 addition & 1 deletion MLModelRunner/ONNXModelRunner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ add_library(ONNXModelRunnerLib OBJECT onnx.cpp
)
endif(LLVM_MLBRIDGE)

target_link_libraries(ONNXModelRunnerLib PUBLIC onnxruntime)
target_include_directories(ONNXModelRunnerLib PUBLIC "${ONNXRUNTIME_ROOTDIR}/include" "${ONNXRUNTIME_ROOTDIR}/include/onnxruntime/core/session" ${TENSORFLOW_AOT_PATH}/include)
target_link_directories(ONNXModelRunnerLib PUBLIC ${ONNXRUNTIME_ROOTDIR}/lib)
target_link_libraries(ONNXModelRunnerLib PRIVATE onnxruntime)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
with the Python-based ML models and a C/C++ compiler. This design allows ML model development within a traditional Python framework while making end-to-end integration with an optimizing compiler possible and efficient.

This repo contains the source code and relevant information described in our paper, ["The Next 700 ML-Enabled Compiler Optimizations"](https://arxiv.org/abs/2311.10800).
Please see [here](https://iith-compilers.github.io/MLCompilerBridge/) for documentation and other details.
Please see [here](https://iith-compilers.github.io/ML-Compiler-Bridge/) for documentation and other details.

> The Next 700 ML-Enabled Compiler Optimizations, S. VenkataKeerthy, Siddharth Jain, Umesh Kalvakuntla, Pranav Sai Gorantla, Rajiv Shailesh Chitale, Eugene Brevdo, Albert Cohen, Mircea Trofin and Ramakrishna Upadrasta. CC 2024.
Expand All @@ -13,7 +13,7 @@ Please see [here](https://iith-compilers.github.io/MLCompilerBridge/) for docume
[![pre-commit checks](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/formatting.yml/badge.svg)](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/formatting.yml)


![Image](images/component-ml-compiler-bridge.png)
![Image](https://github.com/IITH-Compilers/ML-Compiler-Bridge/raw/main/images/component-ml-compiler-bridge.png)

## Features
* **Unified Framework:** Comes with a suite of two inter-process and two in-process model runners and three serialization-deserialization mechanisms to support interleaved and non-interleaved communication between models and compiler.
Expand Down
3 changes: 2 additions & 1 deletion SerDes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ else()

add_library(SerDesCLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp JSON.cpp)
endif()
target_include_directories(SerDesLib PRIVATE ${TENSORFLOW_AOT_PATH}/include)
target_include_directories(SerDesLib PUBLIC ${TENSORFLOW_AOT_PATH}/include)
target_link_libraries(SerDesLib PRIVATE tf_xla_runtime)
11 changes: 7 additions & 4 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ SHORT_NAMES = NO
# description.)
# The default value is: NO.

JAVADOC_AUTOBRIEF = NO
JAVADOC_AUTOBRIEF = YES

# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
# such as
Expand Down Expand Up @@ -1016,7 +1016,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = test

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand All @@ -1040,7 +1040,10 @@ EXCLUDE_PATTERNS =
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# ANamespace::AClass, ANamespace::*Test

EXCLUDE_SYMBOLS =
EXCLUDE_SYMBOLS = NpEncoder \
llvm::json::* \
hello-mlbridge.* \
mlbridge-test.*

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
Expand Down Expand Up @@ -2757,7 +2760,7 @@ PLANTUML_INCLUDE_PATH =
# Minimum value: 0, maximum value: 10000, default value: 50.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_GRAPH_MAX_NODES = 50
DOT_GRAPH_MAX_NODES = 15

# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
# generated by dot. A depth value of 3 means that only nodes reachable from the
Expand Down
1 change: 0 additions & 1 deletion test/MLBridgeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "llvm/Support/CommandLine.h"
#include <algorithm>
#include <fstream>
#include <google/protobuf/text_format.h>
#include <iostream>
#include <iterator>
#include <memory>
Expand Down

0 comments on commit 289c68d

Please sign in to comment.