SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
GPU
GPU
• 图形处理器( Graphics Processing Unit )
• 专门用来处理在个人电脑、工作站或游戏机上图像运算工作
• 显卡的“心脏”
• 90%以上的新型台式电脑和笔记本型电脑拥有集成图形处理器,但是在性能
上往往低于那些独立显卡。
GPU 发展
• 1999年NVIDIA发布GeForce256芯片时首先提出GPU的概念。
http://www.nvidia.cn/object/tesla-case-studies-cn.html
GPU-Z
CPU VS GPU
http://www.zhihu.com/question/19903344
native applications can access the device’s graphical
processing unit (GPU) to make pixels fly. Web
applications, on the other hand, run in the context of
the browser, which lets the software do most (if not
all) of the rendering, resulting in less horsepower for
transitions. But the Web has been catching up, and
most browser vendors now provide graphical
hardware acceleration by means of particular CSS
rules.
http://mobile.smashingmagazine.com/2012/06/21/play-with-hardware-accelerated-css/
FPS
“每秒显示帧数”(Frame per Second,FPS,帧率)或“赫兹”
关闭/开启GPU
Y硬件加速的方面
• General layout compositing
• CSS3 transitions
• CSS3 3D transforms
• Canvas Drawing
• WebGL 3D Drawing
如何启用GPU加速
. box{
- webki t - t r ansf or m: t r ansl at eZ( 0) ;
- moz- t r ansf or m: t r ansl at eZ( 0) ;
- ms- t r ansf or m: t r ansl at eZ( 0) ;
- o- t r ansf or m: t r ansl at eZ( 0) ;
t r ansf or m: t r ansl at eZ( 0) ;
}
防止页面闪烁
. box{
- webki t - backf ace- vi si bi l i t y: hi dden;
- moz- backf ace- vi si bi l i t y: hi dden;
- ms- backf ace- vi si bi l i t y: hi dden;
backf ace- vi si bi l i t y: hi dden;
- webki t - per spect i ve: 1000;
- moz- per spect i ve: 1000;
- ms- per spect i ve: 1000;
per spect i ve: 1000;
}
Demo
http://jsbin.com/imotos/1/watch
translate与absolute测试对比
元素个数 动画类型 占用CPU 占用GPU FPS
20
translate
5%~6% 0%~1% 59~63
translate+3D加速 2%~4% 0%~1% 59~63
absolute 4%~6% 0%~1% 59~63
absolute+3D加速 5%~6% 0%~1% 59~63
200
translate 14%~16% 0%~1% 59~63
translate+3D加速 5%~7% 0%~1% 59~63
absolute 10%~12% 0%~1% 59~63
absolute+3D加速 15%~19% 0%~1% 59~63
2000
translate 25%~26% 0%~1% 10~12
translate+3D加速 21%~23% 1%~2% 56~77
absolute 24%~25% 0%~1% 15~20
absolute+3D加速 24%~26% 0%~1% 6~12
translate 3D加速对比
Before After
rotate()测试数据
元素个数 动画类型 占用CPU 占用GPU FPS
20
rotate()
1%~2% 1%~2% 56~63
rotate()+3D加速 1%~2% 1%~2% 56~63
200
rotate() 14%~15% 1%~2% 56~63
rotate()+3D加速 5%~7% 2%~4% 56~63
2000
rotate() 25%~26% 0%~1% 10~12
rotate()+3D加速 21%~23% 1%~3% 56~77
scale()测试数据
元素个数 动画类型 占用CPU 占用GPU FPS
20
scale()
4%~5% 2%~4% 56~63
scale()+3D加速 1%~2% 1%~2% 56~63
200
scale() 14%~15% 1%~2% 56~63
scale()3D加速 5%~7% 2%~4% 56~63
2000
scale() 25%~26% 0%~1% 10~12
scale()3D加速 21%~23% 1%~3% 56~77
关于测试
• 扩大测试数量级
• 多次采样取平均值
{硬件加速}?*
带来的问题
参考资料
• http://css-tricks.com/tale-of-animation-performance/
• http://docs.nvidia.com/cuda/cuda-c-programming-guide/
• http://wenku.baidu.com/view/75102b4133687e21af45a963.html
• http://www.html5rocks.com/en/tutorials/speed/html5/
• http://zh.wikipedia.org/wiki/OpenGL
• http://zh.wikipedia.org/wiki/Direct3D
• http://mobile.smashingmagazine.com/2012/06/21/play-with-hardware-accelerated-css/
• http://stackoverflow.com/questions/10014461/why-does-enabling-hardware-acceleration-in-css3-slow-down-
performance
• https://developer.nvidia.com/gpu-accelerated-path-rendering
• http://www.gwxdn.com/html/hardware/video/2011/0329/16905.html
• http://zh.wikipedia.org/wiki/%E7%A1%AC%E4%BB%B6%E5%8A%A0%E9%80%9F

Más contenido relacionado

Similar a 被解放的Gpu 麦时

GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
NVIDIA Taiwan
 
19564926 graphics-processing-unit
19564926 graphics-processing-unit19564926 graphics-processing-unit
19564926 graphics-processing-unit
Dayakar Siddula
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 

Similar a 被解放的Gpu 麦时 (20)

GPU-Virtualization-in-openSUSE.pdf
GPU-Virtualization-in-openSUSE.pdfGPU-Virtualization-in-openSUSE.pdf
GPU-Virtualization-in-openSUSE.pdf
 
Introducing Amazon EC2 P3 Instance - Featuring the Most Powerful GPU for Mach...
Introducing Amazon EC2 P3 Instance - Featuring the Most Powerful GPU for Mach...Introducing Amazon EC2 P3 Instance - Featuring the Most Powerful GPU for Mach...
Introducing Amazon EC2 P3 Instance - Featuring the Most Powerful GPU for Mach...
 
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
 
Flowframes
FlowframesFlowframes
Flowframes
 
Don't turn on/off your Photoshop yet
Don't turn on/off your Photoshop yetDon't turn on/off your Photoshop yet
Don't turn on/off your Photoshop yet
 
Monitoring of GPU Usage with Tensorflow Models Using Prometheus
Monitoring of GPU Usage with Tensorflow Models Using PrometheusMonitoring of GPU Usage with Tensorflow Models Using Prometheus
Monitoring of GPU Usage with Tensorflow Models Using Prometheus
 
Part 4 Maximizing the utilization of GPU resources on-premise and in the cloud
Part 4  Maximizing the utilization of GPU resources on-premise and in the cloudPart 4  Maximizing the utilization of GPU resources on-premise and in the cloud
Part 4 Maximizing the utilization of GPU resources on-premise and in the cloud
 
The new HP Z8 Fury G5 Workstation Desktop PC: Crunch through demanding worklo...
The new HP Z8 Fury G5 Workstation Desktop PC: Crunch through demanding worklo...The new HP Z8 Fury G5 Workstation Desktop PC: Crunch through demanding worklo...
The new HP Z8 Fury G5 Workstation Desktop PC: Crunch through demanding worklo...
 
Introduction to Hybrid SLI Technology
Introduction to Hybrid SLI TechnologyIntroduction to Hybrid SLI Technology
Introduction to Hybrid SLI Technology
 
Pc54
Pc54Pc54
Pc54
 
IRJET-A Study on Parallization of Genetic Algorithms on GPUS using CUDA
IRJET-A Study on Parallization of Genetic Algorithms on GPUS using CUDAIRJET-A Study on Parallization of Genetic Algorithms on GPUS using CUDA
IRJET-A Study on Parallization of Genetic Algorithms on GPUS using CUDA
 
19564926 graphics-processing-unit
19564926 graphics-processing-unit19564926 graphics-processing-unit
19564926 graphics-processing-unit
 
CMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment WorkloadsCMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment Workloads
 
モノビットエンジンがついにクラウド化!しかし、インフラでまさかのAzureを利用!?本当に大丈夫なの?
モノビットエンジンがついにクラウド化!しかし、インフラでまさかのAzureを利用!?本当に大丈夫なの?モノビットエンジンがついにクラウド化!しかし、インフラでまさかのAzureを利用!?本当に大丈夫なの?
モノビットエンジンがついにクラウド化!しかし、インフラでまさかのAzureを利用!?本当に大丈夫なの?
 
10. GPU - Video Card (Display, Graphics, VGA)
10. GPU - Video Card (Display, Graphics, VGA)10. GPU - Video Card (Display, Graphics, VGA)
10. GPU - Video Card (Display, Graphics, VGA)
 
Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...
Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...
Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)
 
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
 
Hardware Accelerated 2D Rendering for Android
Hardware Accelerated 2D Rendering for AndroidHardware Accelerated 2D Rendering for Android
Hardware Accelerated 2D Rendering for Android
 

Más de time zhong (6)

一起移动吧 交互篇
一起移动吧 交互篇一起移动吧 交互篇
一起移动吧 交互篇
 
一起移动吧 基础篇
一起移动吧 基础篇一起移动吧 基础篇
一起移动吧 基础篇
 
网站字体渲染 麦时
网站字体渲染 麦时网站字体渲染 麦时
网站字体渲染 麦时
 
网站字体渲染-麦时
网站字体渲染-麦时网站字体渲染-麦时
网站字体渲染-麦时
 
我的一天 仲金龙(麦时)
我的一天 仲金龙(麦时)我的一天 仲金龙(麦时)
我的一天 仲金龙(麦时)
 
再回首重构 仲金龙(麦时) 20120426
再回首重构 仲金龙(麦时) 20120426再回首重构 仲金龙(麦时) 20120426
再回首重构 仲金龙(麦时) 20120426
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

被解放的Gpu 麦时