Skip to content

Commit 2d5c2f5

Browse files
committed
Minor changes to workflow, README
1 parent 99c5acf commit 2d5c2f5

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
run: |
4646
conda init
4747
conda activate mlbridge
48+
pip install compilerinterface
4849
cd $GITHUB_WORKSPACE/test
4950
bash mlbridge-test.sh
5051
- uses: actions/upload-artifact@v2

.github/workflows/upload_pypi.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
release:
55
types:
66
- published
7-
push:
8-
branches:
9-
- pip-package # or
107
workflow_dispatch:
118
inputs:
129
pypi_repo:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10)
22

3-
project(MLCompilerBridge VERSION 0.0.1)
3+
project(MLCompilerBridge VERSION 0.0.2)
44
add_compile_options("$<$<CONFIG:${CMAKE_BUILD_TYPE}>:-UNDEBUG>")
55
set(protobuf_MODULE_COMPATIBLE TRUE)
66
find_package(Protobuf CONFIG REQUIRED)

CompilerInterface/compilerinterface/GrpcCompilerInterface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def start_server(self):
8787
"{}:{}".format(self.host, self.server_port)
8888
)
8989

90-
if added_port == self.server_port:
90+
if str(added_port) == str(self.server_port):
9191
server.start()
9292
print("Server Running")
9393
server.wait_for_termination()

CompilerInterface/compilerinterface/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ------------------------------------------------------------------------------
2+
#
3+
# Part of the MLCompilerBridge Project, under the Apache License v2.0 with LLVM
4+
# Exceptions. See the LICENSE file for license information.
5+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
#
7+
# ------------------------------------------------------------------------------
8+
19
from .BaseCompilerInterface import BaseCompilerInterface
210
from .PipeCompilerInterface import PipeCompilerInterface
311
from .GrpcCompilerInterface import GrpcCompilerInterface

CompilerInterface/fetch_version.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
import subprocess as sp
2-
import pathlib as pl
1+
# ------------------------------------------------------------------------------
2+
#
3+
# Part of the MLCompilerBridge Project, under the Apache License v2.0 with LLVM
4+
# Exceptions. See the LICENSE file for license information.
5+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
#
7+
# ------------------------------------------------------------------------------
8+
39
import re
410

511
version_regex = re.compile(r"^project\(MLCompilerBridge VERSION (?P<version>[^)]+)\)$")

CompilerInterface/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ classifiers = [
1717
"Intended Audience :: Science/Research",
1818
"Topic :: Scientific/Engineering :: Artificial Intelligence",
1919
"Topic :: Software Development :: Compilers",
20+
"Development Status :: 4 - Beta",
21+
"Operating System :: POSIX :: Linux",
2022
]
2123

2224
[build-system]

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Please see [here](https://iith-compilers.github.io/ML-Compiler-Bridge/) for docu
1111
[![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)
1212
[![Doxygen Action](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/main.yml/badge.svg)](https://github.com/IITH-Compilers/MLCompilerBridge/actions/workflows/main.yml)
1313
[![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)
14+
[![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)
1415

1516

1617
![Image](https://github.com/IITH-Compilers/ML-Compiler-Bridge/raw/main/images/component-ml-compiler-bridge.png)
@@ -43,10 +44,11 @@ Please see [here](https://iith-compilers.github.io/ML-Compiler-Bridge/) for docu
4344
1. `mkdir build && cd build`
4445
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> ../`
4546
3. `make -j [&& make install]`
47+
4. `pip install compilerinterface`
4648

4749
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++.
4850

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

5153
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`.
5254

0 commit comments

Comments
 (0)