Skip to content

Commit 6825096

Browse files
committed
...
1 parent 0590e33 commit 6825096

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/make.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313

1414
- name: Clone dependencies
1515
run: |
16-
git clone https://github.com/triton-inference-server/core # core/include/triton/core/tritonserver.h
17-
git clone https://github.com/mono/CppSharp
16+
git clone --single-branch --depth 1 https://github.com/triton-inference-server/core
17+
git clone --single-branch --depth 1 https://github.com/mono/CppSharp
1818
1919
- name: Build CppSharp
2020
run: |
@@ -23,7 +23,7 @@ jobs:
2323
bash build/build.sh download_llvm -platform $PLATFORM
2424
bash build/build.sh restore -platform $PLATFORM
2525
bash build/build.sh -platform $PLATFORM -build_only
26-
find
26+
find bin
2727
2828
2929
# - uses: actions/upload-artifact@v4

tritonserver.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using CppSharp;
2+
using CppSharp.AST;
3+
using CppSharp.Generators;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
10+
namespace CppSharpTransformer
11+
{
12+
class DllDemoGenerator : ILibrary
13+
{
14+
public static void Main(string[] args)
15+
{
16+
ConsoleDriver.Run(new DllDemoGenerator());
17+
}
18+
19+
void Setup(Driver driver)
20+
{
21+
var options = driver.Options;
22+
options.GeneratorKind = GeneratorKind.CSharp;
23+
var module = options.AddModule("TritonServer");
24+
module.IncludeDirs.Add("core/include");
25+
module.Headers.Add("triton/core/tritonserver.h");
26+
//module.LibraryDirs.Add("/path/to/triton/server.so");
27+
//module.Libraries.Add("tritonserver.so");
28+
}
29+
30+
public void SetupPasses(Driver driver) { }
31+
public void Preprocess(Driver driver, ASTContext ctx) { }
32+
public void Postprocess(Driver driver, ASTContext ctx) { }
33+
void ILibrary.Setup(Driver driver) { }
34+
}
35+
}

0 commit comments

Comments
 (0)