static void Main(string[] args) { try { CudafyModes.DeviceId = 0; CudafyModes.Architecture = CudafyHost.GetDevice(eGPUType.Cuda, CudafyModes.DeviceId).GetArchitecture(); //eArchitecture.sm_35; // *** Change this to the architecture of your target board *** CudafyModes.Target = CompilerHelper.GetGPUType(CudafyModes.Architecture); if (CudafyModes.Target != eGPUType.OpenCL) { CURANDTests.Basics(); } StringTests st = new StringTests(); CudafyUnitTest.PerformAllTests(st); BasicFunctionTests bft = new BasicFunctionTests(); CudafyUnitTest.PerformAllTests(bft); GMathUnitTests gmu = new GMathUnitTests(); CudafyUnitTest.PerformAllTests(gmu); MultithreadedTests mtt = new MultithreadedTests(); CudafyUnitTest.PerformAllTests(mtt); CopyTests1D ct1d = new CopyTests1D(); CudafyUnitTest.PerformAllTests(ct1d); GPGPUTests gput = new GPGPUTests(); CudafyUnitTest.PerformAllTests(gput); if (CudafyHost.GetDeviceCount(CudafyModes.Target) > 1) { MultiGPUTests mgt = new MultiGPUTests(); CudafyUnitTest.PerformAllTests(mgt); } if (CudafyModes.Architecture == eArchitecture.sm_35) { Compute35Features c35f = new Compute35Features(); CudafyUnitTest.PerformAllTests(c35f); } Console.WriteLine("Done"); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.ReadLine(); } }
static void Main(string[] args) { CudafyModes.Target = eGPUType.Cuda; try { for (int i = 0; i < 1; i++) { Console.WriteLine(i); BLAS2 b2 = new BLAS2(); CudafyUnitTest.PerformAllTests(b2); BLAS3 b3 = new BLAS3(); CudafyUnitTest.PerformAllTests(b3); } BLAS1_1D bt = new BLAS1_1D(); CudafyUnitTest.PerformAllTests(bt); BLAS1_2D bt2 = new BLAS1_2D(); CudafyUnitTest.PerformAllTests(bt2); SPARSE1 sparse1 = new SPARSE1(); CudafyUnitTest.PerformAllTests(sparse1); SPARSE_CONVERSION sparse_conv = new SPARSE_CONVERSION(); CudafyUnitTest.PerformAllTests(sparse_conv); SPARSE23 sparse23 = new SPARSE23(); CudafyUnitTest.PerformAllTests(sparse23); LASOLVER solver = new LASOLVER(); CudafyUnitTest.PerformAllTests(solver); CURANDHostTests rt = new CURANDHostTests(); CudafyUnitTest.PerformAllTests(rt); FFTSingleTests st = new FFTSingleTests(); CudafyUnitTest.PerformAllTests(st); FFTDoubleTests dt = new FFTDoubleTests(); CudafyUnitTest.PerformAllTests(dt); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } Console.WriteLine("Done"); Console.ReadLine(); }
static void Main(string[] args) { try { CudafyModes.Target = eGPUType.Cuda; EmbeddedCudafyModuleTests t = new EmbeddedCudafyModuleTests(); CudafyUnitTest.PerformAllTests(t); CudafyModuleAssemblyTests t2 = new CudafyModuleAssemblyTests(); CudafyUnitTest.PerformAllTests(t2); Console.WriteLine("Done"); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.ReadLine(); } }
static void Main(string[] args) { try { CudafyModes.DeviceId = 0; GPGPU gpu = CudafyHost.GetDevice(eGPUType.Cuda, CudafyModes.DeviceId); CudafyModes.Architecture = gpu.GetArchitecture(); //eArchitecture.sm_35; // *** Change this to the architecture of your target board *** CudafyModes.Target = CompilerHelper.GetGPUType(CudafyModes.Architecture); Console.WriteLine("{0}: Arch: {1}, Type: {2}, ID: {3}", gpu.GetDeviceProperties(false).Name, CudafyModes.Architecture, CudafyModes.Target, CudafyModes.DeviceId); if (CudafyModes.Target == eGPUType.Cuda) { CURANDTests.Basics(); } SIMDFunctionTests sft = new SIMDFunctionTests(); CudafyUnitTest.PerformAllTests(sft); StringTests st = new StringTests(); CudafyUnitTest.PerformAllTests(st); BasicFunctionTests bft = new BasicFunctionTests(); CudafyUnitTest.PerformAllTests(bft); GMathUnitTests gmu = new GMathUnitTests(); CudafyUnitTest.PerformAllTests(gmu); MultithreadedTests mtt = new MultithreadedTests(); CudafyUnitTest.PerformAllTests(mtt); CopyTests1D ct1d = new CopyTests1D(); CudafyUnitTest.PerformAllTests(ct1d); GPGPUTests gput = new GPGPUTests(); CudafyUnitTest.PerformAllTests(gput); if (CudafyHost.GetDeviceCount(CudafyModes.Target) > 1) { MultiGPUTests mgt = new MultiGPUTests(); CudafyUnitTest.PerformAllTests(mgt); } if (CudafyModes.Architecture >= eArchitecture.sm_30 && CudafyModes.Target == eGPUType.Cuda) { WarpShuffleTests wst = new WarpShuffleTests(); CudafyUnitTest.PerformAllTests(wst); } if (CudafyModes.Architecture >= eArchitecture.sm_35 && CudafyModes.Target == eGPUType.Cuda) { Compute35Features c35f = new Compute35Features(); CudafyUnitTest.PerformAllTests(c35f); } Console.WriteLine("Done"); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.ReadLine(); } }