- Notifications
You must be signed in to change notification settings - Fork543
ArrayFire: a general purpose GPU library.
License
arrayfire/arrayfire
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ArrayFire is a general-purpose tensor library that simplifies the softwaredevelopment process for the parallel architectures found in CPUs, GPUs, andother hardware acceleration devices. The library serves users in everytechnical computing market.
Several of ArrayFire's benefits include:
- Hundreds of acceleratedtensor computingfunctions, in thefollowing areas:
- Array handling
- Computer vision
- Image processing
- Linear algebra
- Machine learning
- Standard math
- Signal Processing
- Statistics
- Vector algorithms
- Easy to use, stable,well-documented API
- Rigorous benchmarks and tests ensuring top performance and numerical accuracy
- Cross-platform compatibility with support for CUDA, oneAPI, OpenCL, andnative CPU on Windows, Mac, and Linux
- Built-in visualization functions throughForge
- Commercially friendly open-source licensing
- Enterprise support fromArrayFire
ArrayFire provides software developers with a high-level abstraction of datathat resides on the accelerator, theaf::array
object. Developers write codethat performs operations on ArrayFire arrays, which, in turn, are automaticallytranslated into near-optimal kernels that execute on the computational device.
ArrayFire runs on devices ranging from low-power mobile phones to high-powerGPU-enabled supercomputers. ArrayFire runs on CPUs from all major vendors(Intel, AMD, ARM), GPUs from the prominent manufacturers (AMD, Intel, NVIDIA,and Qualcomm), as well as a variety of other accelerator devices on Windows,Mac, and Linux.
Instructions toinstall or to build ArrayFire from source can be found onthewiki.
Visit theWikipedia page for a description of Conway's Game of Life.
staticconstfloat h_kernel[] = {1,1,1,1,0,1,1,1,1 };staticconst arraykernel(3,3, h_kernel, afHost);array state = (randu(128,128, f32) >0.5).as(f32);// Init stateWindowmyWindow(256,256);while(!myWindow.close()) { array nHood =convolve(state, kernel);// Obtain neighbors array C0 = (nHood ==2);// Generate conditions for life array C1 = (nHood ==3); state = state * C0 + C1;// Update state myWindow.image(state);// Display}
The complete source code can be foundhere.
arraypredict(const array &X,const array &W) {returnsigmoid(matmul(X, W));}arraytrain(const array &X,const array &Y,double alpha =0.1,double maxerr =0.05,int maxiter =1000,bool verbose =false) { array Weights =constant(0, X.dims(1), Y.dims(1));for (int i =0; i < maxiter; i++) { array P =predict(X, Weights); array err = Y - P;if (mean<float>(abs(err) < maxerr)break; Weights += alpha *matmulTN(X, err); }return Weights;}...array Weights = train(train_feats, train_targets);array test_outputs = predict(test_feats, Weights);display_results<true>(test_images, test_outputs, test_targets,20);
The complete source code can be foundhere.
For more code examples, visit theexamples/
directory.
You can find the complete documentationhere.
Quick links:
ArrayFire has several official and community maintained language API's:
† Community maintained wrappers
In-Progress Wrappers
The community of ArrayFire developers invites you to build with us if you areinterested and able to write top-performing tensor functions. Together we canfulfillThe ArrayFireMissionfor fast scientific computing for all.
Contributions of any kind are welcome! Please refer tothewiki and ourCode ofConduct to learn more about how you can get involved with the ArrayFireCommunity throughSponsorship,DeveloperCommits,orGovernance.
If you redistribute ArrayFire, please follow the terms established inthelicense. If you wish to cite ArrayFire in an academic publication,please use the followingcitation document.
ArrayFire development is funded by AccelerEyes LLC and several third parties,please see the list ofacknowledgements for anexpression of our gratitude.
- Slack Chat
- Google Groups
- ArrayFire Services:Consulting |Support |Training
The literal mark "ArrayFire" and ArrayFire logos are trademarks of AccelerEyesLLC (dba ArrayFire). If you wish to use either of these marks in your ownproject, please consultArrayFire's TrademarkPolicy
About
ArrayFire: a general purpose GPU library.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.