Overclock.net › Forums › Industry News › Software News › [TPU]NVIDIA CUDA Gets Python Support
New Posts  All Forums:Forum Nav:

[TPU]NVIDIA CUDA Gets Python Support - Page 3

post #21 of 29
Very nice, Python is a cool language
post #22 of 29
Quote:
Originally Posted by Zero4549 View Post

*just realized duckie uses the same keyboard*

Take THAT everyone who trashes on me for this choice tongue.gif

Quote:
Originally Posted by Xeio View Post

I'm not sure what you mean by access closer to a machine level. If you're talking about calling C libraries both have some form of interop to call unmanaged libraries (I've only worked with C# though).

Stuff like memory addressing, garbage collection, and multi-threading.


i.e. Does Python inherit the OS's implementation of threading or has it's own implementation?
Edited by DuckieHo - 3/18/13 at 11:02am
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #23 of 29
Quote:
Originally Posted by DuckieHo View Post


Stuff like memory addressing, garbage collection, and multi-threading.


i.e. Does Python inherit the OS's implementation of threading or has it's own implementation?

You can access memory to a certain limit, but its possible.

And you get what the OS gives you. Its similar to c++ and so on. You can make new threads, control in the code how they run and when they run, but you can't really take over how the OS implements on how it runs the threads.
Main system
(16 items)
 
Editing PC
(8 items)
 
 
CPUGraphicsGraphicsRAM
E5-1680v2 AMD FirePro D700 AMD FirePro D700 64GB 1866mhz 
Hard DriveOSMonitorCase
1TB PCIE SSD OSX 10.10.x Dell U2713H Mac Pro 
  hide details  
Reply
Main system
(16 items)
 
Editing PC
(8 items)
 
 
CPUGraphicsGraphicsRAM
E5-1680v2 AMD FirePro D700 AMD FirePro D700 64GB 1866mhz 
Hard DriveOSMonitorCase
1TB PCIE SSD OSX 10.10.x Dell U2713H Mac Pro 
  hide details  
Reply
post #24 of 29
Quote:
Originally Posted by DuckieHo View Post

Stuff like memory addressing, garbage collection, and multi-threading.
Garbage Collection is generally considered a high-level thing. Multi-threading is easily* done in any language worth using.

Memory addressing is a bit more complicated. Generally you don't need to worry about it in high level languages (Python/C#). If you need to call into a system library though C# provides ways to pass raw memory pointers and similar so you can pass data. It's not particularly pretty, but it works. Python has similar capabilities.
Quote:
Originally Posted by DuckieHo View Post

i.e. Does Python inherit the OS's implementation of threading or has it's own implementation?
Depends. Python and .Net (or Mono) provide an API way above the OS implementation to maintain platform independence. You could directly call the OS level functions, but then you'd lose portability unless you handle every case (you'd have to do that in C/C++ if you're not using a portable library as well).

It would be very rare to have reason to care about the implementation though, so in practice there's no difference.

*Well, spawing threads/processes anyway. Multi-threading is pretty much never "easy".
Edited by Xeio - 3/18/13 at 11:42am
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
post #25 of 29
Quote:
Originally Posted by Zero4549 View Post

Render fractal via CPU - 6 hours. Render the same fractal (granted, with a tiny bit of noise (or "grain", if you prefer) introduced) via CUDA in 1/3 of a second.

Man if only Cinema 4D supported CUDA rendering. Would love to cut my 15 hour 40 minute render to a few minutes...
Base2
(21 items)
 
Edi
(13 items)
 
Zenbook
(7 items)
 
CPUMotherboardGraphicsRAM
Core i7 2600k @ 4.75ghz @ 1.352v Asus p8p67 Deluxe Asus GTX 970 Strix ADATA XPG1 (2x8gb) @ 1600mhz 
Hard DriveHard DriveHard DriveHard Drive
2x OCZ Agility 3  2x Toshiba 2tb Sata 3 OCZ Vertex 2 Seagate Barracuda 500gb 
Optical DriveCoolingCoolingCooling
LG Blu-Ray-RW  Corsair H70 3x Corsair AF 120 Silent Edition 2x AF 140 
OSMonitorMonitorKeyboard
Windows 7 x64 Home Premium Asus VG248QE Asus VG248QE Ducky Shine 3 (MX Black) 
PowerCaseMouseAudio
Corsair AX 1200 Corsair 450D Razer Deathadder 2013 Creative X-FI Titanium HD 
Other
Sennheiser PC 350 
CPUGraphicsRAMHard Drive
Core i7 740QM GTX 460m 2x 4gb DDR3 OCZ Agility 3 
OSMonitor
Windows 7 x64 15.1" (1920x1080) 
CPUGraphicsRAMHard Drive
Core i3 2367M Intel HD 3000 4GB DDR3 Hitachi HDD 
Hard DriveOSMonitor
SanDisk SSD Windows 7 Home Premium x64 13.3" 1366x768 
  hide details  
Reply
Base2
(21 items)
 
Edi
(13 items)
 
Zenbook
(7 items)
 
CPUMotherboardGraphicsRAM
Core i7 2600k @ 4.75ghz @ 1.352v Asus p8p67 Deluxe Asus GTX 970 Strix ADATA XPG1 (2x8gb) @ 1600mhz 
Hard DriveHard DriveHard DriveHard Drive
2x OCZ Agility 3  2x Toshiba 2tb Sata 3 OCZ Vertex 2 Seagate Barracuda 500gb 
Optical DriveCoolingCoolingCooling
LG Blu-Ray-RW  Corsair H70 3x Corsair AF 120 Silent Edition 2x AF 140 
OSMonitorMonitorKeyboard
Windows 7 x64 Home Premium Asus VG248QE Asus VG248QE Ducky Shine 3 (MX Black) 
PowerCaseMouseAudio
Corsair AX 1200 Corsair 450D Razer Deathadder 2013 Creative X-FI Titanium HD 
Other
Sennheiser PC 350 
CPUGraphicsRAMHard Drive
Core i7 740QM GTX 460m 2x 4gb DDR3 OCZ Agility 3 
OSMonitor
Windows 7 x64 15.1" (1920x1080) 
CPUGraphicsRAMHard Drive
Core i3 2367M Intel HD 3000 4GB DDR3 Hitachi HDD 
Hard DriveOSMonitor
SanDisk SSD Windows 7 Home Premium x64 13.3" 1366x768 
  hide details  
Reply
post #26 of 29
Quote:
Originally Posted by Xeio View Post

It would be very rare to have reason to care about the implementation though, so in practice there's no difference.
Thanks for the summary.

I was just curious since for HPC optimization, implementation does matter though. However, as GPGPU moves away from the realm of HPC clusters to workstations.... it matters a bit less.

(Go look at mathematician / physicist / quant / biologist code... especially ones without formal computer science training. It can be baaaaaaaaaaad.)
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #27 of 29
Well, for CUDA you'd still need to be writing CUDA code, which is a C-like language. The python is really just a wrapper, it handles the input and recieves the output, but the CUDA layer is doing all the processing once you tell it what to do. The python code can then do whatever it wants with the results.

Really a random binding isn't much news at all. It just makes using CUDA from Python much much easier.
Edited by Xeio - 3/18/13 at 11:55am
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
Micro Dance
(8 items)
 
  
CPUMotherboardGraphicsRAM
i7-4790k z97i-plus EVGA GTX980 SC 16GB Team Xtreme 2400 
Hard DriveCoolingOSCase
512GB Samsung SSD 830 NH-L12 Windows 10 EVGA Hadron Air 
  hide details  
Reply
post #28 of 29
Quote:
Originally Posted by DuckieHo View Post

Stuff like memory addressing, garbage collection, and multi-threading.
i.e. Does Python inherit the OS's implementation of threading or has it's own implementation?

You shouldn't ever have to worry about those things in such a high level language. Python is easy to use with C. A great method of development with python is to code the project in python and then, after the project is coded, move the few parts that need specific optimization to a C file for performance. You get most of the speed of C without most of the headache. The other alternative is to code for the pypy JIT and let it run.

You should take a look at Python. If you have any coding experience, it will be easy (you can even run Jython on the JVM if you want access to what it offers)
post #29 of 29
Quote:
Originally Posted by hajile View Post

You shouldn't ever have to worry about those things in such a high level language. Python is easy to use with C. A great method of development with python is to code the project in python and then, after the project is coded, move the few parts that need specific optimization to a C file for performance. You get most of the speed of C without most of the headache. The other alternative is to code for the pypy JIT and let it run.

You should take a look at Python. If you have any coding experience, it will be easy (you can even run Jython on the JVM if you want access to what it offers)

Thanks, that was what I was trying to understand..... Python is higher level that C but like you said... you can always optimize that parts that need C in C.
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Software News
Overclock.net › Forums › Industry News › Software News › [TPU]NVIDIA CUDA Gets Python Support