ãã®ããã1幎ã»ã©åã«ãNVIDIAã¯NVIDIA Parallel NsightãšåŒã°ããCUDAã§èšè¿°ããã䞊åããã°ã©ã ããããã°ããããã«ãMicrosoft Visual Studio 2008 sp1ããã³2010ã«çµ±åãããããŒã«ã®ããã±ãŒãžããªãªãŒã¹ããŸããã ããã«ã€ããŠã ãããŠXaocCPS 㯠habrosociety ã«ã€ããŠæžããŸããã ãã以æ¥ããã®è£œåã¯ããé«åºŠã«ãªããå®å šã«ç¡æã«ãªããŸããã ãããŸã§ã®ææ°ããŒãžã§ã³2.0ã å¯èœãªæ§æãã€ã³ã¹ããŒã«ãæ§æãããã³NVIDIA Parallel Nsightã®äž»ãªæ©èœãæ€èšããŠã¿ãŸãããã
å¯èœãªæ§æ
NVIDIAã¯ãParallel Nsightãã€ã³ã¹ããŒã«ããããã®4ã€ã®ããŒããŠã§ã¢æ§æãªãã·ã§ã³ãæäŸããŠããŸããããããã¯ç¹å®ã®ããŒã«ã䜿çšããèœåãç°ãªããŸãã
æ§æ | 1 GPUã·ã¹ãã | 2 GPUã·ã¹ãã | ãããããGPUãåãã2ã€ã®ã·ã¹ãã | åããã·ã³äžã«2ã€ã®GPUãåããã·ã¹ãã ïŒNVIDIA Multi-OSïŒ |
CUDA C / C ++䞊åãããã¬ãŒ | 0 | 1 | 1 | 1 |
Direct3Dã·ã§ãŒããŒãããã¬ãŒ | 0 | 0 | 1 | 1 |
Direct3Dã°ã©ãã£ãã¯ã€ã³ã¹ãã¯ã¿ãŒ | 1 | 1 | 1 | 1 |
ã¢ãã©ã€ã¶ãŒ | 1 | 1 | 1 | 1 |
NVIDIAã¯ããULTIMATEãæ§æ4ãªãã·ã§ã³ãåŒã³åºããŸãã NVIDIA Multi-OSã¯ããããªãã©ã€ããŒéçºè ããµããŒãããä»®æ³ãã·ã³ã§ãã VMWareã䜿çšããŠåæ§ã®ã·ã¹ãã ã解é€ããããšãèããŠããŸããããä»®æ³ã·ã¹ãã ã®ãããªã¢ããã¿ãŒã«ãã©ã€ããŒéçºè ãã€ã³ã¹ããŒã«ã§ããªããšããåé¡ã«çŽé¢ããŸããã
NVIDIAã¯ãéžæããæ§æã«å¿ããŠã次ã®ã·ã¹ãã èŠä»¶ãæäŸããŸãã
ããŒããŠã§ã¢èŠä»¶ïŒ
æäœ | 泚ç®ã® | |
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã | Windows®Vista SP3ãWindows 7ãŸãã¯Windows HPC Server 2008ïŒ32ããããŸãã¯64ãããïŒ | åã |
CPU | Intel Pentiumãã¥ã¢ã«ã³ã¢CPUçžåœ@ 1.6 GHz | 2.2 GHz以äžã®Intel Pentiumãã¥ã¢ã«ã³ã¢CPUãšåç |
RAM | ãã¹ãã®å ŽåïŒ2 GBãã¢ãªã³ã°ãå®è¡ãããã·ã³ã®å ŽåïŒ2 GB | ãã¹ãã®å ŽåïŒ2 GB以äžäžŠåèšç®ãå®è¡ãããã·ã³ã®å ŽåïŒ4 GBä»¥äž |
ããŒããã©ã€ãã®ç©ºã容é | 32ããããã·ã³ïŒParallel Nsightã§240 MB 64ããããã·ã³ïŒParallel Nsightã§330 MB | Parallel Nsightãã¹ãããŒããåãã32ããããã·ã³ïŒ240 MB +ãããžã§ã¯ãçšã®ã¹ããŒã¹ã
Parallel Nsightãã¹ãéšåãåãã64ããããã·ã³ïŒ330 MB +ãããžã§ã¯ãçšã®ã¹ããŒã¹ïŒãªã¢ãŒããã·ã³ã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ãå®è¡/ãããã°ããå Žåããªã¢ãŒããã·ã³ã«ã¯240 MBã®ç©ºãã¹ããŒã¹+ã¢ããªã±ãŒã·ã§ã³ã®ãããã°ããŒãžã§ã³çšã®ã¹ããŒã¹ãå¿ èŠã§ãïŒ |
åºåããã€ã¹ | GPUãèšç®ããããã®ç¬ç«ããã¢ãã¿ãŒ | DVIã®äœ¿çšãæšå¥š |
ããŒã«ã«ãããã°ïŒåããã·ã³äžã®ãã¹ããšèšç®æ©ïŒ | CUDAããµããŒããã2ã€ã®GPUã ïŒãµããŒããããŠããããã€ã¹ã®ãªã¹ããåç §ïŒ | åã |
ãªã¢ãŒããããã°ïŒç°ãªããã·ã³äžã®ãã¹ããšèšç®æ©ïŒ | ã³ã³ãã¥ãŒã¿ãŒå¥ïŒCUDAããµããŒããã1ââã€ã®GPUã ãã¹ãïŒã¹ã¿ãžãªãã€ã³ã¹ããŒã«ãããŠããå ŽæïŒïŒãã¹ããã·ã³äžã®1ã€ã®GPUïŒä»»æã®GPUã䜿çšã§ããŸãã | åã |
GPUãµããŒã | developer.nvidia.com/parallel-nsight-supported-gpus | developer.nvidia.com/parallel-nsight-supported-gpus |
ãœãããŠã§ã¢èŠä»¶ïŒ
ãã£ã¹ãã¬ã€ãã©ã€ã㌠| Parallel NsightããµããŒãããNVIDIAãã£ã¹ãã¬ã€ãã©ã€ããŒãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã NVIDIAã°ã©ãã£ãã¯ã¹ã«ãŒããã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãããŠããå Žåããã®ãã©ã€ããŒã¯ããããæ¢ã«ã€ã³ã¹ããŒã«ãããŠããŸãã ãã ããNVIDIA Parallel Nsightãæ£åžžã«æ©èœãããã«ã¯ããã©ã€ããŒã®æŽæ°ããŒãžã§ã³ãå¿ èŠã§ãã | åã |
ããŒã«ã«ãããã°ïŒãã¹ããšèšç®æ©ã¯åããã·ã³ã§åäœããŸãïŒ | .NET Framework 3.5 SP1 Visual StudioïŒMicrosoft Visual Studio 2008 SP1 Standard Edition以éãŸãã¯Microsoft Visual Studio 2010 | åã |
ãªã¢ãŒããããã°ïŒãã¹ããšèšç®æ©ã¯ç°ãªããã·ã³ã§åäœããŸãïŒ | ãã¹ããã·ã³ïŒ.NET Framework 3.5 SP1 Visual StudioïŒMicrosoft Visual Studio 2008 SP1 Standard Edition以äžãŸãã¯Microsoft Visual Studio 2010ã³ã³ãã¥ãŒãã£ã³ã°ãã·ã³ïŒ.NET Framework 3.5 SP1 | åã |
ãããã¯ãŒã¯ | ã€ã³ã¹ããŒã©ãŒãããŠã³ããŒãããããã®ã€ã³ã¿ãŒãããæ¥ç¶ãªã¢ãŒããããã°ã®å ŽåïŒãã¹ããšãµãã®TCP / IPæ¥ç¶ã è»ã | åã |
Parallel Nsightãã€ã³ã¹ããŒã«ãã
䞊åã³ãŒãããããã°ã§ããããã«ããã«ã¯ã1å°ã®ãã·ã³ã§2ã€ã®CUDAäºæGPUã䜿çšããæ§æã§ååã§ãïŒãã¡ããã2å°ã®ãã·ã³ã䜿çšããæ§æã«ã€ããŠã話ãããæ¹ãã¯ããã«èå³æ·±ãã§ãããããæ®å¿µãªãããçŸåšãã®ãããªæ§æãçµã¿ç«ãŠãæ¹æ³ã¯ãããŸããïŒã
ãã®ãããäœæ¥çšã«ãŒãGeForce GTX460ã«å ããŠãäºç®ã®CUDAãµããŒãã«ãŒãã®1ã€ã§ããGeForce 210ãè³Œå ¥ããå¿ èŠããããŸããã ãããã£ãŠãParallel Nsightã®ã€ã³ã¹ããŒã«çšã«æ¬¡ã®ããŒããŠã§ã¢æ§æãæºåãããŸããã
ãã¹ãïŒ
CPUã¿ã€ã QuadCore AMD Phenom II X4 965ã3918 MHz
Gigabyte GA-790FXTA-UD5ãã¶ãŒããŒãïŒ3 PCIã1 PCI-E x1ã3 PCI-E x16ã4 DDR3 DIMMããªãŒãã£ãªããã¥ã¢ã«ã®ã¬ãããLANãIEEE-1394ïŒ
AMD 790FXãAMD K10 ãã¶ãŒããŒããããã»ãã
4096 MB ã·ã¹ãã ã¡ã¢ãª
çµè«ïŒ
NVIDIA GeForce 210 ãããªã¢ããã¿ãŒ ïŒ512 MBïŒ
ãããªã«ãŒãNVIDIA GeForce GTX 460ïŒ1024 MBïŒ
ã¢ãã¿ãŒ ENV LED2770h [NoDB]ïŒAUBB1JA005271ïŒïŒDVIïŒ
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšããŠãWindows 7ãšã³ã¿ãŒãã©ã€ãºãšãã£ã·ã§ã³x64ã䜿çšããŸããã 次ã«ã2008 sp1以äžã®MVSãå¿ èŠã§ãã
NVIDIA Webãµã€ãã«ã¯ãå¿ èŠãªãã£ã¹ããªãã¥ãŒã·ã§ã³ãå«ãŸããŠããŸãã 以äžãå¿ èŠã§ã ã
- WinVistaããã³Win7ã®éçºè ãã©ã€ããŒ
- CUDAããŒã«ããã
- CUDAã³ã³ãã¥ãŒãã£ã³ã°SDK
- Parallel Nsight 2.0ã
åãé åºã§ãã£ã¹ããªãã¥ãŒã·ã§ã³ãã€ã³ã¹ããŒã«ããŸãã ã¹ã¿ãžãªã§æ°ãããããžã§ã¯ãã®ãŠã£ã¶ãŒããåŒã³åºããšããæ°ããã»ã¯ã·ã§ã³ãNVIDIAãïŒãã³ãã¬ãŒãã¯ããã±ãŒãžãCUDA Toolkitãã«å«ãŸããŠããŸãïŒãè¿œå ãããããžã§ã¯ãã¿ã€ããNVIDIA CUDA 4.0ããéžæããŠãããžã§ã¯ããäœæããŸãã ãã¹ãŠã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ã€ã³ã¹ããŒã«ãæ£ããå Žåãçµæã®ã¯ãŒã«ãã¯ãŒããã³ã³ãã€ã«ããŠå®è¡ã§ããŸãã
ãã¹ãŠå€§äžå€«ã§ããïŒ æ¬¡ã«ãParallel Nsightãããã¬ãŒãçŽæ¥æ±ããŸãã ãã·ã³ã¯ãµãŒããŒãšã³ã³ãã¥ãŒã¿ãŒã®äž¡æ¹ã§ãããããæåã«ãã¹ãã³ã³ããŒãã³ããNsight Monitorããå®è¡ããå¿ èŠããããŸãã ã³ãŒããéããŠãèšç®ã«ãŒãã«ããã·ãŒãžã£ã®ã©ããã«ãã¬ãŒã¯ãã€ã³ããèšå®ããnsightããã«ã®ç¹å¥ãªãã¿ã³ã§ãããžã§ã¯ããéå§ããŸãã ããã€ãã®ç¹ã«æ³šæããŠãã ããã
- ãããžã§ã¯ãã¯äºåã«ãã«ãããå¿ èŠããããŸãïŒnsightã¢ããªã±ãŒã·ã§ã³ã®éå§ãã¿ã³ã¯ã³ã³ãã€ã«ãããŸããïŒã
- ããã°ã©ã ãnsightãããã°ã¢ãŒãã§å®è¡ãããŠããå Žåãèšç®ã³ã¢ã®å€éšã«èšå®ããããã¹ãŠã®ãã¬ãŒã¯ãã€ã³ãã¯ç¡èŠãããŸãã ããã¯éã®é åºã§è¡ãããŸããããã°ã©ã ãéåžžã¢ãŒãã§ãããã°ãããå Žåãéåžžã®ã³ãŒãã®å察åŽã®ãã¬ãŒã¯ãã€ã³ãã®ã¿ãèæ ®ãããŸãã
- Sevenã§nsightãããã¬ãŒãåããŠå®è¡ãããšãå°ãªããšã2ã€ã®åé¡ãçºçããå¯èœæ§ããããŸããWPFã¢ã¯ã»ã©ã¬ãŒã¿ãŒãšã®éäºææ§ãšWindows Aeroã§ãã ãããã¯ãªãã«ããå¿
èŠããããŸãïŒæåã®ã¬ãžã¹ããªã¯ã¬ãžã¹ããªã«è¿œå ããããšã§ãªãã«ãªããŸãïŒ
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics]"DisableHWAcceleration"=dword:00000001
2ã€ç®ã¯ã³ã³ãããŒã«ããã«ããç¡å¹ã«ããŸãïŒãŸãã¯nsightèªäœã§èŠåãã§ãã¯ãç¡å¹ã«ããããšãã§ããŸãïŒã¹ã¿ãžãªã»ããïŒNsight->ãªãã·ã§ã³->ããŒã«ã«ãããã°ãã§ãã¯ããTrueãã«ãªãŒããŒã©ã€ãããŸãããããã«ã¯åé¡ããããããããŸãã ããšãã°ãèšç®ã®ããã€ã¹ããã¹ã¯ããããæç»ããããããªã«ãŒããããã³nsightãããã°ãå®è¡ããããã€ã¹ãšããŠã³ãŒãã§æå®ãããšãæ°žä¹ ã«ããªãŒãºããŸãã Parallel NsightãšWPF / Aeroã®éäºææ§ãäœãæå³ããã®ãã¯æ確ã§ã¯ãããŸããããããŒã«ã«ãããã°ãã§ãã¯ãäžæžãããããªãã·ã§ã³ããªã³ã«ããŠãããã°ããéããããã¬ãŒåŽãšã¡ã«ããºã èªäœã®äž¡æ¹ãããããã®ã¡ã«ããºã ã«åé¡ã¯ãªãã£ãããã§ãã
ãã®ããããã¬ãŒã¯ãã€ã³ãã§ã®ãããã¬ãŒïŒ
ããã§ãéåžžã®ã¢ããªã±ãŒã·ã§ã³ã®ãããã°ãšåæ§ã«ãå©çšå¯èœãªå¶åŸ¡å€ã確èªã§ããŸãã æ¬æ ŒçãªãŠã©ããã£ãŒã䜿çšãããšãã¢ã¬ã€ã衚瀺ã§ããŸãã äžèšã®ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ããAãå€æ°ã¯Matrix3ã¿ã€ãã§ãã
typedef struct {
int x_size;
int y_size;
int z_size;
float4* elements;
} Matrix3;
衚瀺å¯èœãªãèŠçŽ ãé åã®èŠçŽ æ°ã¯ãParallel Nsightãããã¬ãŒèšå®ã®ãæ倧é åèŠçŽ ããã©ã¡ãŒã¿ãŒã«ãã£ãŠæ±ºãŸããŸãã
ã€ã³ããã¯ã¹å€blockIdxããã³threadIdxãããããããã«ããããã¬ãŒã¯æåã®ã°ãªãããããã¯ã®æåã®ã¹ã¬ããã«ãããŸãã åé¡ãçºçããŸãïŒç®çã®ã¹ããªãŒã ã«ç§»åããæ¹æ³ã¯ïŒ nsightããŒã«ã§ã¯ããNsight Cuda Device SummaryããšãããŠã£ã³ããŠã䜿çšã§ããŸããããã¯ãåæ¢ããã¹ããªãŒã ã®è¿ãã§ã¯ãŒãéã移åã§ããã€ã³ã¿ãŒãã§ã€ã¹ã§ãã è¿åã®ãµã€ãºã¯ããããªãããã®ããŒããŠã§ã¢æ©èœã«ãã£ãŠæ±ºãŸããŸãã ãã®ãããåæ¢æã«GeForce 200ã§èšç®ããå Žåã4ã¯ãŒãã®2ãããã¯ãå©çšå¯èœã§ããã
åæ§ã«ãGeForce GTX 460ã®å ŽåïŒ
31ãŠããããå©çšå¯èœã§ãã ã¯ãŒãå ã®ç¹å®ã®ã¹ã¬ããã«ç§»åããã«ã¯ããCuda Debug FocusããŠã£ã³ããŠã䜿çšããå¿ èŠããããŸãïŒãã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ã¯ããããã¯éã移åããããšãã§ããŸãïŒã
ç¹°ãè¿ããŸããããæåã®ã¹ããªãŒã ã®è¿ãã«å ¥ããªãã¹ããªãŒã ã«å ¥ãæ¹æ³ã¯ïŒãã§ãã ãã®ããã«ãæ¡ä»¶ä»ããã¬ãŒã¯ãã€ã³ãã䜿çšãããŸãã æ¡ä»¶ã®æ§æã¯æ¬¡ã®ãšããã§ãã
@blockIdx(x,y,z) && @threadIdx(x,y,z)
ãããã¬ã¯ãæå®ãããã¹ããªãŒã ã§åæ¢ããŸããããã«å¯ŸããŠãã¯ãŒãè¿åã䜿çšå¯èœã«ãªããŸãã
Nvidia Parallel Nsightããã±ãŒãžã«ã¯ããåæã¢ã¯ãã£ããã£ããšåŒã°ãããã°ã©ãåãªã©ã®ããŸããŸãªãã©ã¡ãŒã¿ãŒã䜿çšããŠCUDAãã©ã¡ãŒã¿ãŒèšç®ãåæããããã®åŒ·åãªããŒã«ãå«ãŸããŠããŸãããããã¯å¥ã®èšäºã®ãããã¯ã§ãã
Parralel Nsightã«å¯Ÿããç§ã®å°è±¡ã¯ãæã楜ãããã®ã§ãã 倧ããªãã©ã¹ã¯ãWindowsã®æãäžè¬çãªéçºç°å¢ãžã®çµ±åã§ããããã«æããŸãã æè¿ããã®è£œåãå®å šã«ç¡æã«ãªã£ãããšãç¹°ãè¿ããŸãããããã¯éåžžã«çŽ æŽãããããšã§ãã æåŸã«ãããã¯Windowsã§ã®CUDAããã°ã©ã ã®å¯äžã®ãããã°ããŒã«ã§ãããNVIDIA Compute Visual Profilerãããã¡ã€ã©ãŒãã«ãŠã³ãããŸããã
é¢é£èšäº ã
ãŸããYouTubeã®ããŒããããªãããã€ããããŸãã