-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move legacy api into PaddleNative.legacy.cs
- Loading branch information
Showing
2 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Sdcb.PaddleInference.Native; | ||
|
||
public partial class PaddleNative | ||
{ | ||
/// <summary>Turn on GPU, note: this api is only available when version < 2.5.0</summary> | ||
/// <param name="pd_config">(C API type: PD_Config*) </param> | ||
/// <param name="memory_pool_init_size_mb">initial size of the GPU memory pool in MB.</param> | ||
/// <param name="device_id">device_id the GPU card to use.</param> | ||
[DllImport(PaddleInferenceCLib)] | ||
public static extern void PD_ConfigEnableUseGpu(IntPtr pd_config, ulong memory_pool_init_size_mb, int device_id); | ||
} |