Skip to content

Commit 78ce170

Browse files
committed
...
1 parent 6bcc61d commit 78ce170

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

.github/workflows/tritonservercppsharp.yml

+36-36
Original file line numberDiff line numberDiff line change
@@ -29,40 +29,40 @@ jobs:
2929
run: |
3030
./CppSharp/bin/Release_x64/CppSharp.CLI -m tritonserver -g csharp -p linux -a x64 -o ./variant1/ -I=core/include core/include/triton/core/tritonserver.h core/include/triton/core/tritonbackend.h core/include/triton/core/tritoncache.h core/include/triton/core/tritonrepoagent.h
3131
32-
./CppSharp/bin/Release_x64/CppSharp.CLI -m tritondevelopertoolsserver -g csharp -p linux -a x64 -o ./variant3/ -I=core/include -I=developer_tools/server/include/triton/developer_tools developer_tools/server/include/triton/developer_tools/server_wrapper.h developer_tools/server/include/triton/developer_tools/generic_server_wrapper.h
32+
strace -f ./CppSharp/bin/Release_x64/CppSharp.CLI -m tritondevelopertoolsserver -g csharp -p linux -a x64 -o ./variant3/ -I=core/include -I=developer_tools/server/include/triton/developer_tools developer_tools/server/include/triton/developer_tools/server_wrapper.h developer_tools/server/include/triton/developer_tools/generic_server_wrapper.h developer_tools/server/include/triton/developer_tools/common.h
3333
34-
- name: Variant 2
35-
run: |
36-
echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory><OutputType>Exe</OutputType><TargetFramework>net8.0</TargetFramework><EnableDefaultItems>false</EnableDefaultItems></PropertyGroup><ItemGroup><Compile Remove="**/*.cs"/><Compile Include="tritonservercppsharp.cs"/><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Runtime.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.AST.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Generator.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.CLI.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.CSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Bootstrap.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Gen.dll</HintPath></Reference></ItemGroup></Project>' > tritonservercppsharp.csproj
37-
tee tritonservercppsharp.cs <<EOF
38-
namespace CppSharpTransformer { public class DllDemoGenerator : CppSharp.ILibrary {
39-
public static void Main(string[] args) { CppSharp.ConsoleDriver.Run(new DllDemoGenerator()); }
40-
public void SetupPasses(CppSharp.Driver driver) { }
41-
public void Preprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
42-
public void Postprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
43-
public void Setup(CppSharp.Driver driver) {
44-
var options = driver.Options;
45-
options.GeneratorKind = CppSharp.Generators.GeneratorKind.CSharp;
46-
var module = options.AddModule("tritonserver");
47-
options.OutputDir = "variant2";
48-
module.IncludeDirs.Add(".");
49-
module.IncludeDirs.Add("core/include");
50-
module.Headers.Add("core/include/triton/core/tritonserver.h");
51-
module.Headers.Add("core/include/triton/core/tritonbackend.h");
52-
module.Headers.Add("core/include/triton/core/tritoncache.h");
53-
module.Headers.Add("core/include/triton/core/tritonrepoagent.h");
54-
//module.LibraryDirs.Add("/path/to/triton/server.so");
55-
//module.Libraries.Add("tritonserver.so");
56-
} } }
57-
EOF
58-
59-
mkdir -p bin/x64/Release/$FRAMEWORKDOT && cp -r ./CppSharp/bin/Release_x64/lib bin/x64/Release/$FRAMEWORKDOT/lib
60-
LD_PRELOAD=$PWD/CppSharp/bin/Release_x64/libCppSharp.CppParser.so:$PWD/CppSharp/bin/Release_x64/libStd-symbols.so dotnet run -c Release
61-
62-
63-
- uses: actions/upload-artifact@v4
64-
with:
65-
path: |
66-
variant1/
67-
variant2/
68-
variant3/
34+
# - name: Variant 2
35+
# run: |
36+
# echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory><OutputType>Exe</OutputType><TargetFramework>net8.0</TargetFramework><EnableDefaultItems>false</EnableDefaultItems></PropertyGroup><ItemGroup><Compile Remove="**/*.cs"/><Compile Include="tritonservercppsharp.cs"/><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Runtime.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.AST.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Generator.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.CLI.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.CSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Bootstrap.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Gen.dll</HintPath></Reference></ItemGroup></Project>' > tritonservercppsharp.csproj
37+
# tee tritonservercppsharp.cs <<EOF
38+
# namespace CppSharpTransformer { public class DllDemoGenerator : CppSharp.ILibrary {
39+
# public static void Main(string[] args) { CppSharp.ConsoleDriver.Run(new DllDemoGenerator()); }
40+
# public void SetupPasses(CppSharp.Driver driver) { }
41+
# public void Preprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
42+
# public void Postprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
43+
# public void Setup(CppSharp.Driver driver) {
44+
# var options = driver.Options;
45+
# options.GeneratorKind = CppSharp.Generators.GeneratorKind.CSharp;
46+
# var module = options.AddModule("tritonserver");
47+
# options.OutputDir = "variant2";
48+
# module.IncludeDirs.Add(".");
49+
# module.IncludeDirs.Add("core/include");
50+
# module.Headers.Add("core/include/triton/core/tritonserver.h");
51+
# module.Headers.Add("core/include/triton/core/tritonbackend.h");
52+
# module.Headers.Add("core/include/triton/core/tritoncache.h");
53+
# module.Headers.Add("core/include/triton/core/tritonrepoagent.h");
54+
# //module.LibraryDirs.Add("/path/to/triton/server.so");
55+
# //module.Libraries.Add("tritonserver.so");
56+
# } } }
57+
# EOF
58+
#
59+
# mkdir -p bin/x64/Release/$FRAMEWORKDOT && cp -r ./CppSharp/bin/Release_x64/lib bin/x64/Release/$FRAMEWORKDOT/lib
60+
# LD_PRELOAD=$PWD/CppSharp/bin/Release_x64/libCppSharp.CppParser.so:$PWD/CppSharp/bin/Release_x64/libStd-symbols.so dotnet run -c Release
61+
#
62+
#
63+
# - uses: actions/upload-artifact@v4
64+
# with:
65+
# path: |
66+
# variant1/
67+
# variant2/
68+
# variant3/

0 commit comments

Comments
 (0)