Skip to content

TorchSharp is slower on NetFX comparing to Net Core #546

@tarekgh

Description

@tarekgh

We have enabled TorchSharp to run on .NET Framework. We noticed a performance degradation comparing when running against Net Core. One obvious place to look at is the pinvoke calls cost. measuring simple pinvoke seeing the numbers:

|      Method      |     Mean      |    Error   |   StdDev   |  
| NetCore5OPInvoke |      4.371 ns |  0.0107 ns |  0.0095 ns |  
| NetFxPInvoke     |      7.885 ns |  0.0333 ns |  0.0295 ns | 

Need to look in general on the full stack to find out if there is any opportunity for optimization.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions