You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Program.cs 933 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Reflection;
  3. using BenchmarkDotNet.Configs;
  4. using BenchmarkDotNet.Running;
  5. namespace TensorFlowBenchmark
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. if (args?.Length > 0)
  12. {
  13. for (int i = 0; i < args.Length; i++)
  14. {
  15. string name = $"TensorFlowBenchmark.{args[i]}";
  16. var type = Type.GetType(name);
  17. BenchmarkRunner.Run(type);
  18. }
  19. }
  20. else
  21. {
  22. #pragma warning disable CS0618 // Type or member is obsolete
  23. BenchmarkSwitcher.FromAssembly(Assembly.GetExecutingAssembly()).Run(args, ManualConfig.Create(DefaultConfig.Instance).With(ConfigOptions.DisableOptimizationsValidator));
  24. #pragma warning restore CS0618 // Type or member is obsolete
  25. }
  26. Console.ReadLine();
  27. }
  28. }
  29. }