while i was anxiously waiting for the NodeKO results i was taking a look
at CUDA http://www.nvidia.com/object/cuda_home.html .
I have a MacBook Pro with an Nvidia 330m, which has CUDA support,
downloaded the SDK and docs and was preparing to take a look at it, but
i'm a C newb.
I found a page about GPU computing on Wikipedia which explains the
architecture on http://en.wikipedia.org/wiki/CUDA .
All i know of the node.js internals is what i seen on the node video
conf talk, and if my memory doesn't fail it talks about node having on
process and a single code execution stack? The wikipedia page states:
"Threads should be running in groups of at least 32 for best
performance, with total number of threads numbering in the thousands.
Branches in the program code do not impact performance significantly,
provided that each of 32 threads takes the same execution path; the SIMD
execution model becomes a significant limitation for any inherently
divergent task (e.g. traversing a space partitioning data structure
during raytracing)."
is it worth exploring, what do you think? If so, i call dibs on a
project name, nodeGT ;P
best
--
http://zemanel.eu
http://github.com/zemanel
http://pt.linkedin.com/in/josemoreira
http://djangopeople.net/josemoreira
irc://zem...@irc.freenode.net
2010/9/3 José Moreira <matrix...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
Em 10/09/03 13:16, christkv escreveu:
> I think there's some confusion here. I don't think you can get node.js
> to run code on the GPU now or in the future as it's not meant to be
> used as a CPU executing an application.
>
> On the other hand you might be able to wrap CUDA or OpenCL code using C
> ++ to allow for doing operations on the GPU like matrix calculations
> etc. But that's quite a challenge :)
>
> If you do something around this I'll be very interested. Examples
> could be encryption/decryption, matrix calculations, graph
> analysis ....
>
> On Sep 3, 1:01 pm, Jos� Moreira <matrixowns...@gmail.com> wrote:
>> yeah, i thought about that... i'll go knock on google's door. would be great
>> to be able (or not) to offload at least some work to GPU...
>>
>> anyway i'll go deeper on the cuda docs
>>
>> 2010/9/3 Erik Corry <erik.co...@gmail.com>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> V8 (part of Node) only runs on an x86, x86-64 or ARM CPU so I think
>>> CUDA is a non-starter.
>>> 2010/9/3 Jos� Moreira <matrixowns...@gmail.com>:
irc://zem...@irc.freenode.net
http://mathema.tician.de/software/pycuda
Em 10/09/03 13:18, christkv escreveu:
> This looks like a cool lib for CUDA
>
> http://code.google.com/p/thrust/
>
> On Sep 3, 2:16 pm, christkv <chris...@gmail.com> wrote:
>> I think there's some confusion here. I don't think you can get node.js
>> to run code on the GPU now or in the future as it's not meant to be
>> used as a CPU executing an application.
>>
>> On the other hand you might be able to wrap CUDA or OpenCL code using C
>> ++ to allow for doing operations on the GPU like matrix calculations
>> etc. But that's quite a challenge :)
>>
>> If you do something around this I'll be very interested. Examples
>> could be encryption/decryption, matrix calculations, graph
>> analysis ....
>>
>> On Sep 3, 1:01 pm, Jos� Moreira <matrixowns...@gmail.com> wrote:
>>
>>
>>
>>
>>
>>
>>
>>> yeah, i thought about that... i'll go knock on google's door. would be great
>>> to be able (or not) to offload at least some work to GPU...
>>> anyway i'll go deeper on the cuda docs
>>> 2010/9/3 Erik Corry <erik.co...@gmail.com>
>>>> V8 (part of Node) only runs on an x86, x86-64 or ARM CPU so I think
>>>> CUDA is a non-starter.
>>>> 2010/9/3 Jos� Moreira <matrixowns...@gmail.com>:
irc://zem...@irc.freenode.net
Node does not allow the development of C modules. Node consists of v8
extensions written in C++ and JavaScript. JavaScript is what Node is
about.
GPUs are used for highly-parallelizable math-intensive tasks. Node is
single-threaded because IO isn't easily parallelizable. If processing
speed is your problem you will need to write algorithms in compiled
languages or for CUDA. Nothing of that is related to JavaScript or Node.
I'm not familiar with the existing CUDA and OpenCL C/C++ libs that exist right now, but off the top of my head, a module for this would certainly be interesting.
At first glance though, you would have your work cut out for you. Sounds like the kind of thing you would need to generate and manage your own thread pool for. Probably at the C/C++ module's end . That said, other than that, it should be a straight path to just porting the API as you see fit.
As a side note: I don't see Node being restricted to the server. I could really get into developing local apps with it, and don't see any reason why this would ever be a bad idea.
Cheers
Cheers,
Eugene Lazutkin
http://lazutkin.com/
On 09/14/2010 09:11 PM, Evan Larkin wrote:
> It's also somewhat dangerous for NodeJS.
>
> Currently, two contiguous lines of Javascript can be treated as if they
> will be atomic (because JS is single threaded). Giving it multiple
> threads stops us from being able to do that. It may even cause problems
> with V8 itself.
>
> In short, while it might look to fit the node model, it poorly fits the
> javascript model (in general).
>
> -Evan
>
> On Sep 14, 2010, at 8:57 PM, Jos� Moreira wrote:
>
>> found out that GPU computing supports "even driven development",
>> executing code on teh GPu while the main process continues, which fits
>> on the node.js "model"
>>
>> 2010/9/4 Miguel Coquet
>> <mco...@gmail.com
>> <mailto:mco...@gmail.com>>
>>
>> Hello Jos�,
>>
>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that
>> exist right now, but off the top of my head, a module for this
>> would certainly be interesting.
>>
>> At first glance though, you would have your work cut out for you.
>> Sounds like the kind of thing you would need to generate and
>> manage your own thread pool for. Probably at the C/C++ module's
>> end . That said, other than that, it should be a straight path to
>> just porting the API as you see fit.
>>
>> As a side note: I don't see Node being restricted to the server. I
>> could really get into developing local apps with it, and don't see
>> any reason why this would ever be a bad idea.
>>
>> Cheers
>>
>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>
>> > Hi Astro
>> >
>> > I think he is talking about being able to use the GPU for some
>> > calculations like the python library he is pointing to. Also
>> using a C
>> > lib is trivial as you can wrap it in C++. Node is a combination
>> of C+
>> > +, C and JS :)
>> >
>> > Cheers
>> >
>> > On Sep 4, 3:24 am, Astro <as...@spaceboyz.net
>> <mailto:as...@spaceboyz.net>> wrote:
>> >> Jos� Moreira wrote:
>> >>> yeah i was aware it's single process. Was just wondering that,
>> since
>> >>> node.js allows the development of C modules, there could be a
>> chance for
>> >>> integration here.
>> >>
>> >> Node does not allow the development of C modules. Node consists
>> of v8
>> >> extensions written in C++ and JavaScript. JavaScript is what
>> Node is
>> >> about.
>> >>
>> >> GPUs are used for highly-parallelizable math-intensive tasks.
>> Node is
>> >> single-threaded because IO isn't easily parallelizable. If
>> processing
>> >> speed is your problem you will need to write algorithms in compiled
>> >> languages or for CUDA. Nothing of that is related to JavaScript
>> or Node.
>> >
>> > --
>> > You received this message because you are subscribed to the
>> Google Groups "nodejs" group.
>> > To post to this group, send email to
>> nod...@googlegroups.com
>> <mailto:nod...@googlegroups.com>.
>> > To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com
>> <mailto:nodejs%2Bunsu...@googlegroups.com>.
>> > For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to
>> nod...@googlegroups.com
>> <mailto:nod...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com
>> <mailto:nodejs%2Bunsu...@googlegroups.com>.
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en.
>>
>>
>>
>>
>> --
>> http://zemanel.eu <http://goog_2123512744/>
>> http://github.com/zemanel <http://goog_2123512744/>
>> http://pt.linkedin.com/in/josemoreira
>> http://djangopeople.net/josemoreira <http://goog_2123512744/>
>> irc://zem...@irc.freenode.net
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to
>> nod...@googlegroups.com
>> <mailto:nod...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com
>> <mailto:nodejs+un...@googlegroups.com>.
Many processes: Good
Many threads: Bad
At least, Brendan Eich is against concurrency through threads (and I'm inclined to agree with him in a language with mutable variables):
http://developer.yahoo.com/yui/theater/video.php?v=eich-yuiconf2009-harmony
Brendan Eich: I think the frontrunner is event loop concurrency with promises, sometimes called futures, sometimes people make pedantic distinctions. It preserves a single-threaded view of JavaScript and it allows you, nevertheless, to write concurrent code.
http://weblogs.mozillazine.org/roadmap/archives/2007/02/threads_suck.html (link to his blog)
-Evan
Forgive me if I'm taking these quotes out of context, but I don't believe I am.
On Sep 14, 2010, at 9:20 PM, Eugene Lazutkin wrote:
> Why? Perfectly fits the worker model --- memory is not shared. From the
> point of view of Node it is just an asynchronous process, which is
> finished when an event is signaled. Both OS services (e.g., I/O) and
> external computers (via network I/O) are treated the same way.
>
> Cheers,
>
> Eugene Lazutkin
> http://lazutkin.com/
>
> On 09/14/2010 09:11 PM, Evan Larkin wrote:
>> It's also somewhat dangerous for NodeJS.
>>
>> Currently, two contiguous lines of Javascript can be treated as if they
>> will be atomic (because JS is single threaded). Giving it multiple
>> threads stops us from being able to do that. It may even cause problems
>> with V8 itself.
>>
>> In short, while it might look to fit the node model, it poorly fits the
>> javascript model (in general).
>>
>> -Evan
>>
>> On Sep 14, 2010, at 8:57 PM, José Moreira wrote:
>>
>>> found out that GPU computing supports "even driven development",
>>> executing code on teh GPu while the main process continues, which fits
>>> on the node.js "model"
>>>
>>> 2010/9/4 Miguel Coquet
>>> <mco...@gmail.com
>>> <mailto:mco...@gmail.com>>
>>>
>>> Hello José,
>>>
>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that
>>> exist right now, but off the top of my head, a module for this
>>> would certainly be interesting.
>>>
>>> At first glance though, you would have your work cut out for you.
>>> Sounds like the kind of thing you would need to generate and
>>> manage your own thread pool for. Probably at the C/C++ module's
>>> end . That said, other than that, it should be a straight path to
>>> just porting the API as you see fit.
>>>
>>> As a side note: I don't see Node being restricted to the server. I
>>> could really get into developing local apps with it, and don't see
>>> any reason why this would ever be a bad idea.
>>>
>>> Cheers
>>>
>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>
>>>> Hi Astro
>>>>
>>>> I think he is talking about being able to use the GPU for some
>>>> calculations like the python library he is pointing to. Also
>>> using a C
>>>> lib is trivial as you can wrap it in C++. Node is a combination
>>> of C+
>>>> +, C and JS :)
>>>>
>>>> Cheers
>>>>
>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net
>>> <mailto:as...@spaceboyz.net>> wrote:
Usually GPU is programmed in a specialized language (look for
"shaders"), which fits better its unique computing environment, not a
general-purpose language.
In this schema, GPU is effectively a massively parallel specialized
coprocessor, which you can use to offload some specific computationally
intensive tasks to, and which signals back when the task is done.
Cheers,
Eugene Lazutkin
http://lazutkin.com/
>>> On Sep 14, 2010, at 8:57 PM, Jos� Moreira wrote:
>>>
>>>> found out that GPU computing supports "even driven development",
>>>> executing code on teh GPu while the main process continues, which fits
>>>> on the node.js "model"
>>>>
>>>> 2010/9/4 Miguel Coquet
>>>> <mco...@gmail.com
>>>> <mailto:mco...@gmail.com>>
>>>>
>>>> Hello Jos�,
>>>>
>>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that
>>>> exist right now, but off the top of my head, a module for this
>>>> would certainly be interesting.
>>>>
>>>> At first glance though, you would have your work cut out for you.
>>>> Sounds like the kind of thing you would need to generate and
>>>> manage your own thread pool for. Probably at the C/C++ module's
>>>> end . That said, other than that, it should be a straight path to
>>>> just porting the API as you see fit.
>>>>
>>>> As a side note: I don't see Node being restricted to the server. I
>>>> could really get into developing local apps with it, and don't see
>>>> any reason why this would ever be a bad idea.
>>>>
>>>> Cheers
>>>>
>>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>>
>>>>> Hi Astro
>>>>>
>>>>> I think he is talking about being able to use the GPU for some
>>>>> calculations like the python library he is pointing to. Also
>>>> using a C
>>>>> lib is trivial as you can wrap it in C++. Node is a combination
>>>> of C+
>>>>> +, C and JS :)
>>>>>
>>>>> Cheers
>>>>>
>>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net
>>>> <mailto:as...@spaceboyz.net>> wrote:
Heh, I am not going into religious topics. My understanding is that José
>>>> Hello José,
>>>>
>>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that
>>>> exist right now, but off the top of my head, a module for this
>>>> would certainly be interesting.
>>>>
>>>> At first glance though, you would have your work cut out for you.
>>>> Sounds like the kind of thing you would need to generate and
>>>> manage your own thread pool for. Probably at the C/C++ module's
>>>> end . That said, other than that, it should be a straight path to
>>>> just porting the API as you see fit.
>>>>
>>>> As a side note: I don't see Node being restricted to the server. I
>>>> could really get into developing local apps with it, and don't see
>>>> any reason why this would ever be a bad idea.
>>>>
>>>> Cheers
>>>>
>>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>>
>>>>> Hi Astro
>>>>>
>>>>> I think he is talking about being able to use the GPU for some
>>>>> calculations like the python library he is pointing to. Also
>>>> using a C
>>>>> lib is trivial as you can wrap it in C++. Node is a combination
>>>> of C+
>>>>> +, C and JS :)
>>>>>
>>>>> Cheers
>>>>>
>>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net
>>>> <mailto:as...@spaceboyz.net>> wrote:
Sent from your iPhone
No dia 15 de Set de 2010, às 05:56, Eugene Lazutkin <eugene....@gmail.com> escreveu:
> Heh, I am not going into religious topics. My understanding is that José
>>>>> Hello José,
>>>>>
>>>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that
>>>>> exist right now, but off the top of my head, a module for this
>>>>> would certainly be interesting.
>>>>>
>>>>> At first glance though, you would have your work cut out for you.
>>>>> Sounds like the kind of thing you would need to generate and
>>>>> manage your own thread pool for. Probably at the C/C++ module's
>>>>> end . That said, other than that, it should be a straight path to
>>>>> just porting the API as you see fit.
>>>>>
>>>>> As a side note: I don't see Node being restricted to the server. I
>>>>> could really get into developing local apps with it, and don't see
>>>>> any reason why this would ever be a bad idea.
>>>>>
>>>>> Cheers
>>>>>
>>>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>>>
>>>>>> Hi Astro
>>>>>>
>>>>>> I think he is talking about being able to use the GPU for some
>>>>>> calculations like the python library he is pointing to. Also
>>>>> using a C
>>>>>> lib is trivial as you can wrap it in C++. Node is a combination
>>>>> of C+
>>>>>> +, C and JS :)
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net
>>>>> <mailto:as...@spaceboyz.net>> wrote:
currently i'm interested in testing all this developing a simple math
api, something like:
var math = require('gpu').math;
math.multiplyMatrix(matrixA, matrixB, callback)
...
Or porting something like Python's Numpy/Scipy.
In other news, i'm also wondering how much server-side geo location (a
recent trend) could benefit from this,
something like "sending" a list of coordinates to a GPU and getting
back, for example, all the points in a 1 mile radius from point X.
Investigating the PostGis API came to mind.
Em 10/09/16 19:59, Ricardo Tomasi escreveu:
> +1 OpenCL
>
> Would it be feasible to create a JS API on top of it? It's kind of
> weird to pass a string of foreign code as an argument. The most
> practical use I can think for that is speeding up loops for things
> like filtering data or image processing, that would be great.
>>>>> On Sep 14, 2010, at 8:57 PM, Jos� Moreira wrote:
>>>>>> found out that GPU computing supports "even driven development", executing code on teh GPu while the main process continues, which fits on the node.js "model"
>>>>>> 2010/9/4 Miguel Coquet <mcoq...@gmail.com>
>>>>>> Hello Jos�,
>>>>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that exist right now, but off the top of my head, a module for this would certainly be interesting.
>>>>>> At first glance though, you would have your work cut out for you. Sounds like the kind of thing you would need to generate and manage your own thread pool for. Probably at the C/C++ module's end . That said, other than that, it should be a straight path to just porting the API as you see fit.
>>>>>> As a side note: I don't see Node being restricted to the server. I could really get into developing local apps with it, and don't see any reason why this would ever be a bad idea.
>>>>>> Cheers
>>>>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>>>>> Hi Astro
>>>>>>> I think he is talking about being able to use the GPU for some
>>>>>>> calculations like the python library he is pointing to. Also using a C
>>>>>>> lib is trivial as you can wrap it in C++. Node is a combination of C+
>>>>>>> +, C and JS :)
>>>>>>> Cheers
>>>>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net> wrote:
irc://zem...@irc.freenode.net
>>>>> On Sep 14, 2010, at 8:57 PM, José Moreira wrote:
>>>>>> found out that GPU computing supports "even driven development", executing code on teh GPu while the main process continues, which fits on the node.js "model"
>>>>>> 2010/9/4 Miguel Coquet <mcoq...@gmail.com>
>>>>>> Hello José,
>>>>>> I'm not familiar with the existing CUDA and OpenCL C/C++ libs that exist right now, but off the top of my head, a module for this would certainly be interesting.
>>>>>> At first glance though, you would have your work cut out for you. Sounds like the kind of thing you would need to generate and manage your own thread pool for. Probably at the C/C++ module's end . That said, other than that, it should be a straight path to just porting the API as you see fit.
>>>>>> As a side note: I don't see Node being restricted to the server. I could really get into developing local apps with it, and don't see any reason why this would ever be a bad idea.
>>>>>> Cheers
>>>>>> On Sep 4, 2010, at 12:12 PM, christkv wrote:
>>>>>>> Hi Astro
>>>>>>> I think he is talking about being able to use the GPU for some
>>>>>>> calculations like the python library he is pointing to. Also using a C
>>>>>>> lib is trivial as you can wrap it in C++. Node is a combination of C+
>>>>>>> +, C and JS :)
>>>>>>> Cheers
>>>>>>> On Sep 4, 3:24 am, Astro <as...@spaceboyz.net> wrote:
for multi-threading support, i do think this would be a good solution:fillano
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.