npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-gpu

v0.5.1

Published

Node-RED GPU functions

Downloads

47

Readme

node-red-contrib-gpu

Node Red interface to gpu using gpu.js. Input is one or more arrays or images that are passed in a message. An array can represent a 1,2 or 3 dimensional matrix. Due to the overhead GPU is only efficient where input arrays are of a considerable size.

There is plenty of scope for this node to be enhanced to take advantage of gpu.js features. For example, more standard function, dynamic functions, multi function access to minimise externalisation from GPU between functions.


gpu

This node can be found in function and has form below. Argument 1 is the name of property containing first argument to function. Argument 2 is the name of property containing second argument to function. Target Property where the response is place. Arguments can be numbers or arrays of numbers. Result will change depending on function and data types passed in arguments.

There are 3 ports. One for success, second for failure and third if GPU not supported by hardware. The last allows CPU based equivalents to be implemented so flow can be hardware agnostic.

Pipeline allows information to be retained in GPU between nodes minimising overhead of loading and unloading GPU.

![gpu node](documentation/gpu node.jpg "gpu node")

Functions

  • Code - freeform code
  • Add Array
  • Bitwise And Array
  • Bitwise Or Array
  • Bitwise XOR Array
  • Co-variance
  • Correlation Coefficients (Pearson)
  • Divide Array/option>
  • Left Shift Array
  • Heat Map
  • Image to array
  • Load array into pipeline
  • load array with deltas
  • Matrix Multiple Arrays
  • Moments average,variance, skewness
  • Multiply Array
  • Normalise
  • Power Array
  • Remainder Array
  • Right Shift Array
  • Right Shift Zero Fill Array
  • Statistics average, standard deviation, skewness
  • Subtract Array
  • Sum Columns
  • Sum Rows
  • Image To Array
  • Transpose

Code

This option allows one to provide own code. Extra tabs appear to allow one to code for 1 to 3 dimensions. Depending on dimension variables x,y,z are accessible along with the input array size via variables xSize,ySize,zSize. It should be noted that only a limited subset of javascript is available. See gpu.js for details.

The node determines which dimension code is applicable by the input array. It then builds and cache the kernel for reuse at execution with a depth of 100. Kernels are fixed for output matrix size.
This minimises overhead as in main most input is similar sized and gives maximum flexibility. In future may enable set definable output size and more than one argument which are both required for matrix manipulation.

code


REQUIRE

Can be included and gives access to other functions

  • isGPUSupported
  • isArray
  • arrayCleanse
  • arrayDimensions
  • checkObject

Install

Run the following command in the root directory of your Node-RED install or via GUI install

npm install node-red-contrib-gpu

Version

0.5.0 Add free form code

0.4.0 Major re-arrange of code. Bug fix for rows blocking on norms. Access to more internal functions. Add heat map

0.3.0 Fix blocking issues, add normalized data

0.2.1 fix bug with pipeline incorrectly call in certain situations

0.2.0 Load array with deltas and fix bug with blocking

0.1.1 Even more bug fixes, expanded blocking, pipeline, columns/rows and select column scope.

0.1.0 Even more bug fixes added pipelining, load 2d array into 3d using sizing, select columns for stats metrics

0.0.2 Loads of bug fixes. Added more robust tests

0.0.1 base

Author

Peter Prib