File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 13
13
14
14
- name : Clone dependencies
15
15
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
18
18
19
19
- name : Build CppSharp
20
20
run : |
23
23
bash build/build.sh download_llvm -platform $PLATFORM
24
24
bash build/build.sh restore -platform $PLATFORM
25
25
bash build/build.sh -platform $PLATFORM -build_only
26
- find
26
+ find bin
27
27
28
28
29
29
# - uses: actions/upload-artifact@v4
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments