SlideShare a Scribd company logo
Accelerating computation in html 5
Ashish Shah
SAS R&D INDIA
Outline
 •   Multicore Computing
 •   Problem statement
 •   Demo
 •   Introduction to OpenCL and WebCL
 •   Conclusion
 •   References
Multicore Computing
Problem statement
 Layout algorithm for node-linked graphs




               Layout   Algorithm
DEMO
Demo 1 – Serial version
Demo 2 - Parallel version with multi-core CPU
Demo 3 - Parallel version with many-core GPU
Performance analysis
Time in ms




                           Number of particles
Introduction to OpenCL
•   Open Compute Language, C- like language.
•   Framework for writing parallel algorithms
•   Heterogeneous platforms
•   Developed by Apple
•   Is an open standard and controlled by Khronos
    group
Example of adding two vectors
Serial version
For(i=1 to n)
c[i]= a[i]+b[i];




Using OpenCL
_kernel add(a,b,c)
    {
        int i =get_global_id(); //get thread id
                 c[i]=a[i]+b[i];

    }
OpenCL Architecture
1.   Platform model
2.   Execution model
3.   Memory model
4.   Programming model
OpenCL -Platform
• Device
• Host

                   Host




                  Intel CPU
              GPU 2
           Compute
           Device 1 (GPU
           1)

                              Compute unite (Cores)
OpenCL-Execution Model
                _kernel add(a,b,c)
1. Kernel          {

2. Work-items      int i =get_global_id();//get thread/workitem id
                   c[i]=a[i]+b[i];
3. Work group      }

4. ND-range
5. Program
6. Memory
   objects
7. Command
   queues
Memory Model in OpenCL

        Compute Device

   Private register        Private register              Private register

     Compute unit 0          Compute unit 1                Compute unit 2




  Local memory/cache     Local memory/cache            Local memory/cache




                         Global constant memory-DRAM
                            Global Memory -DRAM
Programming model



1. Data parallel-single function on multiple data



2. Task parallel-Multiple functions on single data
OpenCL Stack


  Java,c,.net,                                           HTML,.java,
  WebCL                  Applications                    .NET,c,c++
                                    kernals

                 OpenCL-Api         Compiler            String data
  context
  Memory Api’s
                     OpenCL Framework

                      OpenCL Runtime           Command
                                               queues, buffer
                                               objects, kernel
                         Device driver         execution

                 OpenCL Device (GPU/CPU
                        hardware)
Essential Development Tasks




     C-code with restrictions




                                  Initialize     Initiate
                                                             Execute    Read back
 Parallelize     Code Kernel      OpenCL       kernels and
                                                              kernel   data to host
                                environment       data
Essential Development Tasks



                • Query compute device
                • Create context
                • Compile kernels




                               Initialize     Initiate
                                                          Execute    Read back
 Parallelize   Code Kernel     OpenCL       kernels and
                                                           kernel   data to host
                             environment       data
Essential Development Tasks



                               • Create memory objects
                               • Map data structures to OpenCL
                                 supported data structures.
                               • Initialize kernel parameters




                               Initialize     Initiate
                                                           Execute    Read back
 Parallelize   Code Kernel     OpenCL       kernels and
                                                            kernel   data to host
                             environment       data
Essential Development Tasks



                                             • Specify number of threads to
                                               execute task
                                             • Trigger the execution of kernel-
                                               sync or async




                               Initialize     Initiate
                                                             Execute        Read back
 Parallelize   Code Kernel     OpenCL       kernels and
                                                              kernel       data to host
                             environment       data
Essential Development Tasks




                                                          • Map to application datastructure




                               Initialize     Initiate
                                                                  Execute        Read back
 Parallelize   Code Kernel     OpenCL       kernels and
                                                                   kernel       data to host
                             environment       data
Introduction to WebCL

•   Java Script bindings for OpenCL
•   First announced in March 2011 by Khronos
•   API definition underway
•   Prototype plugin is available only for Firefox
    browser
Binding OpenCL to WebCL

             CPU



       Host application JavaScript

                WebCL




                                     OpenCL

        OpenCL Framework             compliant

                                      device
Coding with WebCL
platforms   = WebCL.getPlatformIDs();
context     = WebCL.createContextFromType([WebCL.CL_CONTEXT_PLATFORM,
            platforms[0]], WebCL.CL_DEVICE_TYPE_CPU);
devices     = context .getContextInfo(WebCL.CL_CONTEXT_DEVICES);
program     = context .createProgramWithSource(kernelSrc);
kernelfunction1 = program.createKernel(“function1");
buffparam = context.createBuffer(WebCL.CL_MEM_READ_WRITE, bufSize);
cmdQueue = context.createCommandQueue(devices[0], 0);


   cmdQueue.enqueueWriteBuffer(buffparam , true, 0, bufSize, parameter, []);
   kernelfunction1.setKernelArg(0, buffparam , WebCL.types.float2);
   cmdQueue.enqueueNDRangeKernel(kernelfunction1 , 1, [], totalWorkitems,
                                 totalWorkgroups, []);
   cmdQueue.finish ();


cmdQueue.enqueueReadBuffer(‘xyz’, true, 0, bufSize, ‘xyzParam’, []);
Applications of OpenCL
•   Database mining
•   Neural networks
•   Physics based simulation,mechanics
•   Image processing
•   Speech processing
•   Weather forecasting and climate research
•   Bioinformatics
Conclusion

 • Significant performance gains in using OpenCL
   for computations in client-side environments
   like HTML5

 • Algorithms need to be ‘parallelizable’

 • Further optimizations can be achieved by
   exploiting memory model
Software/Hardware used in demo application

Hardware
  Intel(R) Core(TM)2 Quad core CPU Q8400 @ 2.66GHz
  Nvidia 160m Quadro 8 cores @ 580 MHz
Software
  OpenCL runtime for CPU
    http://software.intel.com/en-us/articles/vcsource-
     tools-opencl-sdk/
  OpenCL runtime for GPU
    http://www.nvidia.com/object/quadro_nvs_notebook.
     html
  WebCL plugin for Firefox
    http://webcl.nokiaresearch.com/
References

 http://www.macresearch.org/opencl
 http://en.wikipedia.org/wiki/GPGPU
 http://www.khronos.org/webcl/
Ad

More Related Content

What's hot (20)

Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
Knoldus Inc.
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
Fabio Fumarola
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
byonggon chun
 
Centralized Application Configuration with Spring and Apache Zookeeper
Centralized Application Configuration with Spring and Apache ZookeeperCentralized Application Configuration with Spring and Apache Zookeeper
Centralized Application Configuration with Spring and Apache Zookeeper
Ryan Gardner
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
Saurav Haloi
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch KubernetesKubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
rhirschfeld
 
Introduction to hazelcast
Introduction to hazelcastIntroduction to hazelcast
Introduction to hazelcast
Emin Demirci
 
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark ClustersApril 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
Yahoo Developer Network
 
#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt
rhirschfeld
 
Spark Working Environment in Windows OS
Spark Working Environment in Windows OSSpark Working Environment in Windows OS
Spark Working Environment in Windows OS
Universiti Technologi Malaysia (UTM)
 
Zookeeper In Action
Zookeeper In ActionZookeeper In Action
Zookeeper In Action
juvenxu
 
A fun cup of joe with open liberty
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
Andy Mauer
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4
Amin Mesbahi
 
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
Yahoo Developer Network
 
High Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of ViewHigh Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of View
aragozin
 
Shipping python project by docker
Shipping python project by dockerShipping python project by docker
Shipping python project by docker
Wei-Ting Kuo
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
tomasbart
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesday
Andrei Savu
 
Beyond x86: Managing Multi-platform Environments with OpenStack
Beyond x86: Managing Multi-platform Environments with OpenStackBeyond x86: Managing Multi-platform Environments with OpenStack
Beyond x86: Managing Multi-platform Environments with OpenStack
Phil Estes
 
Developing Frameworks for Apache Mesos
Developing Frameworks  for Apache MesosDeveloping Frameworks  for Apache Mesos
Developing Frameworks for Apache Mesos
Joe Stein
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
Knoldus Inc.
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
Fabio Fumarola
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
byonggon chun
 
Centralized Application Configuration with Spring and Apache Zookeeper
Centralized Application Configuration with Spring and Apache ZookeeperCentralized Application Configuration with Spring and Apache Zookeeper
Centralized Application Configuration with Spring and Apache Zookeeper
Ryan Gardner
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
Saurav Haloi
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch KubernetesKubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
rhirschfeld
 
Introduction to hazelcast
Introduction to hazelcastIntroduction to hazelcast
Introduction to hazelcast
Emin Demirci
 
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark ClustersApril 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
April 2016 HUG: CaffeOnSpark: Distributed Deep Learning on Spark Clusters
Yahoo Developer Network
 
#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt
rhirschfeld
 
Zookeeper In Action
Zookeeper In ActionZookeeper In Action
Zookeeper In Action
juvenxu
 
A fun cup of joe with open liberty
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
Andy Mauer
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4
Amin Mesbahi
 
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
April 2016 HUG: The latest of Apache Hadoop YARN and running your docker apps...
Yahoo Developer Network
 
High Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of ViewHigh Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of View
aragozin
 
Shipping python project by docker
Shipping python project by dockerShipping python project by docker
Shipping python project by docker
Wei-Ting Kuo
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
tomasbart
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesday
Andrei Savu
 
Beyond x86: Managing Multi-platform Environments with OpenStack
Beyond x86: Managing Multi-platform Environments with OpenStackBeyond x86: Managing Multi-platform Environments with OpenStack
Beyond x86: Managing Multi-platform Environments with OpenStack
Phil Estes
 
Developing Frameworks for Apache Mesos
Developing Frameworks  for Apache MesosDeveloping Frameworks  for Apache Mesos
Developing Frameworks for Apache Mesos
Joe Stein
 

Viewers also liked (20)

Migración de datos con OpenERP-Kettle
Migración de datos con OpenERP-KettleMigración de datos con OpenERP-Kettle
Migración de datos con OpenERP-Kettle
raimonesteve
 
Tao zhang
Tao zhangTao zhang
Tao zhang
harishk2
 
Elementos ETL - Kettle Pentaho
Elementos ETL - Kettle Pentaho Elementos ETL - Kettle Pentaho
Elementos ETL - Kettle Pentaho
valex_haro
 
Jenkins Peru Meetup Docker Ecosystem
Jenkins Peru Meetup Docker EcosystemJenkins Peru Meetup Docker Ecosystem
Jenkins Peru Meetup Docker Ecosystem
Mario IC
 
Pentaho | Data Integration & Report designer
Pentaho | Data Integration & Report designerPentaho | Data Integration & Report designer
Pentaho | Data Integration & Report designer
Hamdi Hmidi
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
Carlos Sanchez
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Giovanni Toraldo
 
Introduction to docker swarm
Introduction to docker swarmIntroduction to docker swarm
Introduction to docker swarm
Walid Ashraf
 
Docker Ecosystem - Part II - Compose
Docker Ecosystem - Part II - ComposeDocker Ecosystem - Part II - Compose
Docker Ecosystem - Part II - Compose
Mario IC
 
NGINX Plus PLATFORM For Flawless Application Delivery
NGINX Plus PLATFORM For Flawless Application DeliveryNGINX Plus PLATFORM For Flawless Application Delivery
NGINX Plus PLATFORM For Flawless Application Delivery
Ashnikbiz
 
Business Intelligence and Big Data Analytics with Pentaho
Business Intelligence and Big Data Analytics with Pentaho Business Intelligence and Big Data Analytics with Pentaho
Business Intelligence and Big Data Analytics with Pentaho
Uday Kothari
 
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Puppet
 
Docker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Docker Ecosystem: Engine, Compose, Machine, Swarm, RegistryDocker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Docker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Mario IC
 
Introduction to GPU Programming
Introduction to GPU ProgrammingIntroduction to GPU Programming
Introduction to GPU Programming
Chakkrit (Kla) Tantithamthavorn
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Carlos Sanchez
 
Advanced ETL2 Pentaho
Advanced ETL2  Pentaho Advanced ETL2  Pentaho
Advanced ETL2 Pentaho
Sunny U Okoro
 
Building Data Integration and Transformations using Pentaho
Building Data Integration and Transformations using PentahoBuilding Data Integration and Transformations using Pentaho
Building Data Integration and Transformations using Pentaho
Ashnikbiz
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
NGINX, Inc.
 
Building a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and DockerBuilding a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and Docker
Wellington Marinho
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
Evan Lin
 
Migración de datos con OpenERP-Kettle
Migración de datos con OpenERP-KettleMigración de datos con OpenERP-Kettle
Migración de datos con OpenERP-Kettle
raimonesteve
 
Elementos ETL - Kettle Pentaho
Elementos ETL - Kettle Pentaho Elementos ETL - Kettle Pentaho
Elementos ETL - Kettle Pentaho
valex_haro
 
Jenkins Peru Meetup Docker Ecosystem
Jenkins Peru Meetup Docker EcosystemJenkins Peru Meetup Docker Ecosystem
Jenkins Peru Meetup Docker Ecosystem
Mario IC
 
Pentaho | Data Integration & Report designer
Pentaho | Data Integration & Report designerPentaho | Data Integration & Report designer
Pentaho | Data Integration & Report designer
Hamdi Hmidi
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
Carlos Sanchez
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Giovanni Toraldo
 
Introduction to docker swarm
Introduction to docker swarmIntroduction to docker swarm
Introduction to docker swarm
Walid Ashraf
 
Docker Ecosystem - Part II - Compose
Docker Ecosystem - Part II - ComposeDocker Ecosystem - Part II - Compose
Docker Ecosystem - Part II - Compose
Mario IC
 
NGINX Plus PLATFORM For Flawless Application Delivery
NGINX Plus PLATFORM For Flawless Application DeliveryNGINX Plus PLATFORM For Flawless Application Delivery
NGINX Plus PLATFORM For Flawless Application Delivery
Ashnikbiz
 
Business Intelligence and Big Data Analytics with Pentaho
Business Intelligence and Big Data Analytics with Pentaho Business Intelligence and Big Data Analytics with Pentaho
Business Intelligence and Big Data Analytics with Pentaho
Uday Kothari
 
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Puppet
 
Docker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Docker Ecosystem: Engine, Compose, Machine, Swarm, RegistryDocker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Docker Ecosystem: Engine, Compose, Machine, Swarm, Registry
Mario IC
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Carlos Sanchez
 
Advanced ETL2 Pentaho
Advanced ETL2  Pentaho Advanced ETL2  Pentaho
Advanced ETL2 Pentaho
Sunny U Okoro
 
Building Data Integration and Transformations using Pentaho
Building Data Integration and Transformations using PentahoBuilding Data Integration and Transformations using Pentaho
Building Data Integration and Transformations using Pentaho
Ashnikbiz
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
NGINX, Inc.
 
Building a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and DockerBuilding a data warehouse with Pentaho and Docker
Building a data warehouse with Pentaho and Docker
Wellington Marinho
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
Evan Lin
 
Ad

Similar to Indic threads pune12-accelerating computation in html 5 (20)

OpenCL Programming 101
OpenCL Programming 101OpenCL Programming 101
OpenCL Programming 101
Yoss Cohen
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NoSuchCon
 
Introduction to OpenCL
Introduction to OpenCLIntroduction to OpenCL
Introduction to OpenCL
Unai Lopez-Novoa
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
abinaya m
 
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
AMD Developer Central
 
MattsonTutorialSC14.pdf
MattsonTutorialSC14.pdfMattsonTutorialSC14.pdf
MattsonTutorialSC14.pdf
George Papaioannou
 
General Purpose GPU Computing
General Purpose GPU ComputingGeneral Purpose GPU Computing
General Purpose GPU Computing
GlobalLogic Ukraine
 
MattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxMattsonTutorialSC14.pptx
MattsonTutorialSC14.pptx
gopikahari7
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET Platform
Alex Thissen
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
pradeepfn
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
WSO2
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
Tomislav Plavcic
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
PAPIs.io
 
Building machine learning applications locally with spark
Building machine learning applications locally with sparkBuilding machine learning applications locally with spark
Building machine learning applications locally with spark
Joel Pinho Lucas
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
OpenEBS
 
Adf with docker
Adf with dockerAdf with docker
Adf with docker
Eugene Fedorenko
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
CodeFest
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Dongwon Kim
 
Building SuperComputers @ Home
Building SuperComputers @ HomeBuilding SuperComputers @ Home
Building SuperComputers @ Home
Abhishek Parolkar
 
Inside CoreCLR
Inside CoreCLRInside CoreCLR
Inside CoreCLR
Martin Kulov
 
OpenCL Programming 101
OpenCL Programming 101OpenCL Programming 101
OpenCL Programming 101
Yoss Cohen
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NoSuchCon
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
abinaya m
 
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
AMD Developer Central
 
MattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxMattsonTutorialSC14.pptx
MattsonTutorialSC14.pptx
gopikahari7
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET Platform
Alex Thissen
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
pradeepfn
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
WSO2
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
Tomislav Plavcic
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
PAPIs.io
 
Building machine learning applications locally with spark
Building machine learning applications locally with sparkBuilding machine learning applications locally with spark
Building machine learning applications locally with spark
Joel Pinho Lucas
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
OpenEBS
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
CodeFest
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Dongwon Kim
 
Building SuperComputers @ Home
Building SuperComputers @ HomeBuilding SuperComputers @ Home
Building SuperComputers @ Home
Abhishek Parolkar
 
Ad

More from IndicThreads (20)

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
IndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
IndicThreads
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices
IndicThreads
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreads
IndicThreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
IndicThreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before Reacting
IndicThreads
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
IndicThreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprises
IndicThreads
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreads
IndicThreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
IndicThreads
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams
IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
IndicThreads
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
IndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedback
IndicThreads
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
IndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 
Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
IndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
IndicThreads
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices
IndicThreads
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreads
IndicThreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
IndicThreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before Reacting
IndicThreads
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
IndicThreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprises
IndicThreads
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreads
IndicThreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
IndicThreads
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams
IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
IndicThreads
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
IndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedback
IndicThreads
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
IndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 

Indic threads pune12-accelerating computation in html 5

  • 1. Accelerating computation in html 5 Ashish Shah SAS R&D INDIA
  • 2. Outline • Multicore Computing • Problem statement • Demo • Introduction to OpenCL and WebCL • Conclusion • References
  • 4. Problem statement  Layout algorithm for node-linked graphs Layout Algorithm
  • 5. DEMO Demo 1 – Serial version Demo 2 - Parallel version with multi-core CPU Demo 3 - Parallel version with many-core GPU
  • 6. Performance analysis Time in ms Number of particles
  • 7. Introduction to OpenCL • Open Compute Language, C- like language. • Framework for writing parallel algorithms • Heterogeneous platforms • Developed by Apple • Is an open standard and controlled by Khronos group
  • 8. Example of adding two vectors Serial version For(i=1 to n) c[i]= a[i]+b[i]; Using OpenCL _kernel add(a,b,c) { int i =get_global_id(); //get thread id c[i]=a[i]+b[i]; }
  • 9. OpenCL Architecture 1. Platform model 2. Execution model 3. Memory model 4. Programming model
  • 10. OpenCL -Platform • Device • Host Host Intel CPU GPU 2 Compute Device 1 (GPU 1) Compute unite (Cores)
  • 11. OpenCL-Execution Model _kernel add(a,b,c) 1. Kernel { 2. Work-items int i =get_global_id();//get thread/workitem id c[i]=a[i]+b[i]; 3. Work group } 4. ND-range 5. Program 6. Memory objects 7. Command queues
  • 12. Memory Model in OpenCL Compute Device Private register Private register Private register Compute unit 0 Compute unit 1 Compute unit 2 Local memory/cache Local memory/cache Local memory/cache Global constant memory-DRAM Global Memory -DRAM
  • 13. Programming model 1. Data parallel-single function on multiple data 2. Task parallel-Multiple functions on single data
  • 14. OpenCL Stack Java,c,.net, HTML,.java, WebCL Applications .NET,c,c++ kernals OpenCL-Api Compiler String data context Memory Api’s OpenCL Framework OpenCL Runtime Command queues, buffer objects, kernel Device driver execution OpenCL Device (GPU/CPU hardware)
  • 15. Essential Development Tasks C-code with restrictions Initialize Initiate Execute Read back Parallelize Code Kernel OpenCL kernels and kernel data to host environment data
  • 16. Essential Development Tasks • Query compute device • Create context • Compile kernels Initialize Initiate Execute Read back Parallelize Code Kernel OpenCL kernels and kernel data to host environment data
  • 17. Essential Development Tasks • Create memory objects • Map data structures to OpenCL supported data structures. • Initialize kernel parameters Initialize Initiate Execute Read back Parallelize Code Kernel OpenCL kernels and kernel data to host environment data
  • 18. Essential Development Tasks • Specify number of threads to execute task • Trigger the execution of kernel- sync or async Initialize Initiate Execute Read back Parallelize Code Kernel OpenCL kernels and kernel data to host environment data
  • 19. Essential Development Tasks • Map to application datastructure Initialize Initiate Execute Read back Parallelize Code Kernel OpenCL kernels and kernel data to host environment data
  • 20. Introduction to WebCL • Java Script bindings for OpenCL • First announced in March 2011 by Khronos • API definition underway • Prototype plugin is available only for Firefox browser
  • 21. Binding OpenCL to WebCL CPU Host application JavaScript WebCL OpenCL OpenCL Framework compliant device
  • 22. Coding with WebCL platforms = WebCL.getPlatformIDs(); context = WebCL.createContextFromType([WebCL.CL_CONTEXT_PLATFORM, platforms[0]], WebCL.CL_DEVICE_TYPE_CPU); devices = context .getContextInfo(WebCL.CL_CONTEXT_DEVICES); program = context .createProgramWithSource(kernelSrc); kernelfunction1 = program.createKernel(“function1"); buffparam = context.createBuffer(WebCL.CL_MEM_READ_WRITE, bufSize); cmdQueue = context.createCommandQueue(devices[0], 0); cmdQueue.enqueueWriteBuffer(buffparam , true, 0, bufSize, parameter, []); kernelfunction1.setKernelArg(0, buffparam , WebCL.types.float2); cmdQueue.enqueueNDRangeKernel(kernelfunction1 , 1, [], totalWorkitems, totalWorkgroups, []); cmdQueue.finish (); cmdQueue.enqueueReadBuffer(‘xyz’, true, 0, bufSize, ‘xyzParam’, []);
  • 23. Applications of OpenCL • Database mining • Neural networks • Physics based simulation,mechanics • Image processing • Speech processing • Weather forecasting and climate research • Bioinformatics
  • 24. Conclusion • Significant performance gains in using OpenCL for computations in client-side environments like HTML5 • Algorithms need to be ‘parallelizable’ • Further optimizations can be achieved by exploiting memory model
  • 25. Software/Hardware used in demo application Hardware Intel(R) Core(TM)2 Quad core CPU Q8400 @ 2.66GHz Nvidia 160m Quadro 8 cores @ 580 MHz Software OpenCL runtime for CPU http://software.intel.com/en-us/articles/vcsource- tools-opencl-sdk/ OpenCL runtime for GPU http://www.nvidia.com/object/quadro_nvs_notebook. html WebCL plugin for Firefox http://webcl.nokiaresearch.com/

Editor's Notes

  • #3: Html applications use multicores
  • #4: What are multicores?Compare Cpu and GpuAdvantages of using GPUHow is it possible to do so.Moors lawSimple questions
  • #5: -Explain network diagram-how to render-performance issue-solve it using parallel computation opencl technologyUse different color force directed.Real time use ,giving imp to diagram than textReplace Force directed algorithm with simple lay out algo.
  • #6: Fontext for demoPause and explain details,with variation in speech
  • #8: Brief OpenCl intro.Dreaft and open specification.Parallel only!!!Thread amnagement,synch is simple
  • #10: Why this models?How architecture helps in improving performance
  • #11: HierarcyHosta calls
  • #12: What to do with execution model.Acces threads,Create memory,execute program,CommandsWorkgrou-cores corrospondence
  • #18: Explain mapping data structures
  • #22: More details on WebCL
  • #27: variation in speechConclusion… and question