Skip to content

Commit

Permalink
Minor changes to workflow, README
Browse files Browse the repository at this point in the history
  • Loading branch information
RajivChitale committed Mar 2, 2024
1 parent 99c5acf commit b474253
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
run: |
conda init
conda activate mlbridge
pip install compilerinterface
cd $GITHUB_WORKSPACE/test
bash mlbridge-test.sh
- uses: actions/upload-artifact@v2
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/upload_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
release:
types:
- published
push:
branches:
- pip-package # or
workflow_dispatch:
inputs:
pypi_repo:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(MLCompilerBridge VERSION 0.0.1)
project(MLCompilerBridge VERSION 0.0.2)
add_compile_options("$<$<CONFIG:${CMAKE_BUILD_TYPE}>:-UNDEBUG>")
set(protobuf_MODULE_COMPATIBLE TRUE)
find_package(Protobuf CONFIG REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def start_server(self):
"{}:{}".format(self.host, self.server_port)
)

if added_port == self.server_port:
if str(added_port) == str(self.server_port):
server.start()
print("Server Running")
server.wait_for_termination()
Expand Down
10 changes: 8 additions & 2 deletions CompilerInterface/fetch_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import subprocess as sp
import pathlib as pl
# ------------------------------------------------------------------------------
#
# Part of the MLCompilerBridge Project, under the Apache License v2.0 with LLVM
# Exceptions. See the LICENSE file for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ------------------------------------------------------------------------------

import re

version_regex = re.compile(r"^project\(MLCompilerBridge VERSION (?P<version>[^)]+)\)$")
Expand Down
2 changes: 2 additions & 0 deletions CompilerInterface/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ classifiers = [
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Compilers",
"Development Status :: 4 - Beta",
"Operating System :: POSIX :: Linux",
]

[build-system]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Please see [here](https://iith-compilers.github.io/ML-Compiler-Bridge/) for docu
[![Build and Tests](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/build.yml/badge.svg)](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/build.yml)
[![Doxygen Action](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/main.yml/badge.svg)](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/main.yml)
[![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)
[![Upload to Pypi](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/upload_pypi.yml/badge.svg)](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/upload_pypi.yml)


![Image](https://github.com/IITH-Compilers/ML-Compiler-Bridge/raw/main/images/component-ml-compiler-bridge.png)
Expand Down Expand Up @@ -43,10 +44,11 @@ Please see [here](https://iith-compilers.github.io/ML-Compiler-Bridge/) for docu
1. `mkdir build && cd build`
2. `cmake [-DCMAKE_BUILD_TYPE=Release|Debug] [-DCMAKE_INSTALL_PREFIX=<Install_path>] [-DMLBRIDGE_ENABLE_TEST=ON|OFF] -DONNXRUNTIME_ROOTDIR=<Path to ONNX install dir> -DPROTOS_DIRECTORY=<Path to protobuf files> -DTENSORFLOW_AOT_PATH=<Path to TensorFlow pip install dir> ../`
3. `make -j [&& make install]`
4. `pip install compilerinterface`

This process would generate `libMLCompilerBridge.a` and `libMLCompilerBridgeC.a` libraries under `build/lib` directory, required headers under `build/include` directory. `libMLCompilerBridgeC.a` exposes C APIs for using with C-based compilers like Pluto, where as `libMLCompilerBridge.a` exposes C++ APIs that can be used with any compiler written in C++.

Python end points are available under [`CompilerInterface`](./CompilerInterface/).
Python end points are available under [`CompilerInterface`](./CompilerInterface/). They can be downloaded as a [`package`](https://pypi.org/project/compilerinterface/) from pypi.

To ensure the correctness, run `make verify-all`. This would need enabling tests in cmake (`-DMLBRIDGE_ENABLE_TEST=ON`) and `PROTOS_DIRECTORY` should point to `test/protos`.

Expand Down

0 comments on commit b474253

Please sign in to comment.