Going to try CUDA or OpenCL.

Additional operating system/hardware discussion (Windows, Linux, *BSD and others)
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Going to try CUDA or OpenCL.

Unread postby Nuke » Thu Mar 15, 2012 5:57 am

I haven't decided which one I'm going to learn yet.

Any good online tutorials that you guys can link? :)

Going to attempt making an HTTP server (based on Lighttpd) that can run using one of them.

(In other news, I just repaired my server and I'm going to try running either OpenIndiana or FreeBSD on it. Yay.)

User avatar
Adrenaline
Posts: 504
Joined: Thu Feb 10, 2005 1:37 pm
Location: Laurel, MD USA
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Adrenaline » Thu Mar 15, 2012 6:59 am

I tried CUDA a while back and ended up switching to OpenCL for some little tools I wrote.

Recently I've been playing with C++ AMP coupled with C#. With WinRT you can directly call C++ code from your C# project without having to do DLL Imports. Saves me a lot of time building UI functionality in C# and then using the C++ AMP code for the CPU/GPU intensive work. Kind of the best of both works :)

There's two links on the subject that got me started:
http://blogs.amd.com/developer/2011/06/ ... oft-c-amp/
http://blogs.msdn.com/b/pfxteam/archive ... 36375.aspx

On a side note, if you do C#, checkout the Task Parallel Library, Microsoft really made it is easy coupled with the Concurrent Collections Objects for using all of the available cores.
:Indigo: 33mhz R3k/48mb/XS24 :Indy: 150mhz R4400/256mb/XL24 :Fuel: 600mhz R14kA/2gb/V10 Image 8x1.4ghz Itanium 2/8GB :O3x08R: 32x600mhz R14kA/24GB :Tezro: 4x700mhz R16k/8GB/V12/DCD/SAS/FC/DM5 (2x) :O3x0: 4x700mhz R16k/4GB :PrismDT: 2x1.6ghz 8mb/12gb/SAS/2xFGL

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Nuke » Thu Mar 15, 2012 9:05 am

I don't do C#. Lol.

But thanks for the OpenCL tutorials. I also found a CUDA tutorial off of Google.

http://supercomputingblog.com/cuda/cuda ... g-started/

User avatar
Adrenaline
Posts: 504
Joined: Thu Feb 10, 2005 1:37 pm
Location: Laurel, MD USA
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Adrenaline » Thu Mar 15, 2012 9:28 am

Nuke wrote:I don't do C#. Lol.

But thanks for the OpenCL tutorials. I also found a CUDA tutorial off of Google.

http://supercomputingblog.com/cuda/cuda ... g-started/


Didn't realize you didn't do C#, maybe that should go in our signatures :)
:Indigo: 33mhz R3k/48mb/XS24 :Indy: 150mhz R4400/256mb/XL24 :Fuel: 600mhz R14kA/2gb/V10 Image 8x1.4ghz Itanium 2/8GB :O3x08R: 32x600mhz R14kA/24GB :Tezro: 4x700mhz R16k/8GB/V12/DCD/SAS/FC/DM5 (2x) :O3x0: 4x700mhz R16k/4GB :PrismDT: 2x1.6ghz 8mb/12gb/SAS/2xFGL

User avatar
guardian452
Posts: 2906
Joined: Tue Aug 21, 2007 10:12 pm
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby guardian452 » Thu Mar 15, 2012 9:39 am

I don't do C#. Lol.
Lol.

I've noticed a definite trend at my school towards learning CUDA. Presumably, it's easier to learn. It could also be that most/all our school computers have Nvidia graphics in them. I've attended a few seminars with CUDA, not to mention both my laptop and desktop have CUDA-capable cards (geforce 320m and 9400gt) I started by downloading the CUDA SDK and poking about with the sample code and programs.

I have yet to see a webserver running on a graphic card, but then again, I haven't really looked. It sounds like a big project, especially for a beginner, but that's no reason to not try! The sorts of projects I've tried are more typical academic stuff... moving data around in memory, bouncing balls/particles around, gee-wiz cloth simulations, etc.

User avatar
Adrenaline
Posts: 504
Joined: Thu Feb 10, 2005 1:37 pm
Location: Laurel, MD USA
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Adrenaline » Thu Mar 15, 2012 9:50 am

Would it really make a difference though?

Coming from a .NET world, IIS has built in kernel level caching so before it even hits the .NET Application Pool it returns the requests to the clients. I guess if you were doing a lot of SHA or MD5 hashing it might make a difference, but then you could write your web app with parallelism in mind.

It definitely is an interesting idea though, I'd love to see benchmarks comparing Apache or IIS to it.
:Indigo: 33mhz R3k/48mb/XS24 :Indy: 150mhz R4400/256mb/XL24 :Fuel: 600mhz R14kA/2gb/V10 Image 8x1.4ghz Itanium 2/8GB :O3x08R: 32x600mhz R14kA/24GB :Tezro: 4x700mhz R16k/8GB/V12/DCD/SAS/FC/DM5 (2x) :O3x0: 4x700mhz R16k/4GB :PrismDT: 2x1.6ghz 8mb/12gb/SAS/2xFGL

User avatar
R-ten-K
Posts: 1850
Joined: Mon Nov 15, 2004 11:36 pm
Location: Nor Cal

Re: Going to try CUDA or OpenCL.

Unread postby R-ten-K » Thu Mar 15, 2012 3:53 pm

Nuke wrote:Going to attempt making an HTTP server (based on Lighttpd) that can run using one of them.


Why? Why? Why? Why? Why? Why? (Where's the banging in the head smiley when you need it?)


CUDA and OpenCL are parallel programming frameworks destined to tackle problems which require huge computational densities. A webserver is certainly not one of those problems, it is the opposite actually.

One should understand the problem first, before focusing on the tool.
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby PymbleSoftware » Thu Mar 15, 2012 4:19 pm

We used CUDA in OpenCV stuff for number plate recognition, I've messed about a little with CUDA just out of interest.
CUDA is good for SIMD type stuff... I've been thinking about rewriting my ray tracer and doing parallel ray tracing with it....
...ah-but-then[1a] later Intels (Prescot or something?) have a SIMD dor product instructions. [2a] and several cores with SIMD going...
Also I think Intel had Wolfenstien 3D ray traced in real time with a whole heap of FPGAs or something.

OpenCL doesn't hold much interest for me but I have a book on it and played around with it a little.

OpenIndiana is kind of lame-ass gay and OpenCV (without CUDA) later than a certain version (2.x..?) was absolute hell to port on it...


R.
----

1a. also-caaan-lah.
2a. Not that I've measured it in a profiler or anything but I have a gut-feeling my ray tracer spends most of its time in dot product calculations in object/ray intersectsion detection code.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

@PymbleSoftware
Current Apps -> https://itunes.apple.com/au/artist/pymb ... d553990081
Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
Visit http://www.pymblesoftware.com
Search for "Pymble", "InstaElf", "CryWhy" or "Cricket Score Sheet" in the iPad App store or search for "Pymble" or "CryWhy" in the iPhone App store.

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Nuke » Fri Mar 16, 2012 6:17 am

*wishes this forum had a multiquote system like mine*

@Adrenaline: Lol, I don't think that there's an OI port of Mono. But yeah, I said that I would be on FreeBSD or OI in the first post, so definitely no IIS. If I could make an in-kernel but secure server, that would be great. But I definitely lack the experience. Also, I can benchmark Apache and Lighttpd when I get home, if you want. But not IIS, due to my troubles trying to get my Windows copy to work.
@First part of Guardian's post: I see.
@Second part of Guardian's post: Yeah, I know. I don't think it'll work well, but it's an okay way to get started, I guess. And if it works, then I guess it's good.
@R10K: Yeah, I know that it probably won't work, but I'll at least get some sort of experience. However, any speedup is a good speedup to me. On the other hand, if it's slower, then it's a waste of my time.
@PymbleSoftware: Okay.
@All: I think I'll go with OpenCL.

User avatar
guardian452
Posts: 2906
Joined: Tue Aug 21, 2007 10:12 pm
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby guardian452 » Fri Mar 16, 2012 7:50 am

R-ten-K wrote:Why? Why? Why? Why? Why? Why? (Where's the banging in the head smiley when you need it?)


CUDA and OpenCL are parallel programming frameworks destined to tackle problems which require huge computational densities. A webserver is certainly not one of those problems, it is the opposite actually.
Why is the wrong question. Why not?

Nuke wrote:*wishes this forum had a multiquote system like mine*
Oh look, two quote blocks in this post.

User avatar
Alver
Posts: 742
Joined: Wed Dec 07, 2005 5:46 pm
Location: Zele, Belgium
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Alver » Fri Mar 16, 2012 8:37 am

guardian452 wrote:
R-ten-K wrote:Why? Why? Why? Why? Why? Why? (Where's the banging in the head smiley when you need it?)

CUDA and OpenCL are parallel programming frameworks destined to tackle problems which require huge computational densities. A webserver is certainly not one of those problems, it is the opposite actually.
Why is the wrong question. Why not?

Why not build a 3D game in COBOL?

Well... mainly, because it isn't intended to be used for that, and you'll gain nothing by doing it anyway. But hey, if it tickles the funnybone... :)
while (!asleep()) sheep++;

User avatar
Nuke
Posts: 153
Joined: Tue Jan 10, 2012 7:30 am
Contact:

Re: Going to try CUDA or OpenCL.

Unread postby Nuke » Fri Mar 16, 2012 10:34 am

guardian452 wrote:
R-ten-K wrote:Why? Why? Why? Why? Why? Why? (Where's the banging in the head smiley when you need it?)


CUDA and OpenCL are parallel programming frameworks destined to tackle problems which require huge computational densities. A webserver is certainly not one of those problems, it is the opposite actually.
Why is the wrong question. Why not?

Nuke wrote:*wishes this forum had a multiquote system like mine*
Oh look, two quote blocks in this post.

Heh, true. But I mean a button. Because I'm pretty much too lazy to actually do quotes.

And Alver...lulz.

User avatar
R-ten-K
Posts: 1850
Joined: Mon Nov 15, 2004 11:36 pm
Location: Nor Cal

Re: Going to try CUDA or OpenCL.

Unread postby R-ten-K » Fri Mar 16, 2012 3:54 pm

Nuke wrote:@R10K: Yeah, I know that it probably won't work, but I'll at least get some sort of experience. However, any speedup is a good speedup to me. On the other hand, if it's slower, then it's a waste of my time.


Unless you focus on accelerating encryption or image compression, serving webpages is for the most part an I/O intensive and latency sensitive process, with little computational density and heavy branching. It is literally the antithesis of the problem domains the CUDA and OpenCL programming models address

Time is better spent understanding the problem and tool domains first, rather than trying to solve a problem you don't quite understand with a tool about which you know very little. If you don't grasp that concept, no "experience" is going to offset that basic lack of understanding and awful methodology in your future endeavors.

:)
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: Going to try CUDA or OpenCL.

Unread postby zmttoxics » Fri Mar 16, 2012 8:03 pm

I agree, this is silly. Time would be better spent trying to write a simple httpd from scratch. Sockets, file i/o, IPC, etc, etc... A lot of good stuff can be learned from a project like that. Writing a mail app is another good time waster (I had these as network programming assignments in college, thought they were good time spent versus yet another card game).
Stuff.

hamei
Posts: 9895
Joined: Tue Feb 24, 2004 5:10 pm

Re: Going to try CUDA or OpenCL.

Unread postby hamei » Fri Mar 16, 2012 9:17 pm

zmttoxics wrote:(I had these as network programming assignments in college, thought they were good time spent versus yet another card game).

A lot of things bored the shit out of me in school. Then later on, when I came across real-world (tm) uses for the subject, I found it quite interesting and worked my butt off learning how previously-boring subjects worked. Most useful software started out as a solution to one person's problem.


Return to “Miscellaneous Operating Systems/Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests