SlideShare a Scribd company logo
2
Most read
8
Most read
9
Most read
Automatically+Fusing+Functions+on+CuPy
Akifumi Imanishi
What’s'CuPy
• An'implementation'of'NumPy6compatible
multi6dimensional'array'on'CUDA
• CuPy enables'us'to'write'Python'Codes
for'running'on'GPU.
• Two'basic'operations
• elementwise
• Applying'the'function'to'each'element
• reduction
• Reducing'elements
Problems'of'CuPy
• Small'functions'are'called'many'times.
• Communication'time'between'CPU'and'GPU'is'a'
bottleneck.
• A'mechanism'of'fusing'functions'is'needed'to'resolve'it.
• ex.)':''x'*'y'+'z'*'3'+'5
• There'are'4'kernel'calls'in'total.
• We'want'to'calculate'the'expression'in'1'kernel'call.
UI'for'elementwise'kernel
• Converting'a'Python'function'to'an'Elementwise.
• ex.)
Constructing'a'Data'Structure
3 5
*
*
+
+
x y z
Generating'an'Elementwise
UI'for'reduction'kernel
• Converting'a'Python'function'to'a'ReductionKernel.
• ex.)
Rewrite'adam.py by'using'”fuse”
Results
• chainer/optimizers/adam.py (update_one_gpu)
• chainer/example/mnist/train_mnist.py
Memory'usage'(MiB)
Ufunc 225
Elementwise 211
Fusion 211
78.656
62.430 62.874
55.000
60.000
65.000
70.000
75.000
80.000
85.000
Ufunc Elementwise fusion
Running'times
Memory'usage

More Related Content

PDF
Making Linux do Hard Real-time
PDF
情報処理技術者試験で学ぶ SAML
PDF
Apache Torqueについて
PDF
Introduction to Python Asyncio
PDF
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
PDF
05.2 virtio introduction
PPTX
PyCUDAの紹介
PDF
Android binder-ipc
Making Linux do Hard Real-time
情報処理技術者試験で学ぶ SAML
Apache Torqueについて
Introduction to Python Asyncio
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
05.2 virtio introduction
PyCUDAの紹介
Android binder-ipc

What's hot (20)

PDF
IIJmio meeting 11 HLR/HSS開放とは何か?
PPTX
イベント駆動プログラミングとI/O多重化
PDF
Lisperの見る世界
PPTX
Basics you should know about UNIX and LINUX
PDF
Yet another introduction to Linux RCU
PPTX
Rustを支える技術
PDF
IIJmio meeting #2 技術基準適合証明(技適)と3G/LTEバンドの話
PDF
Entegre Lojistik Destek Yönetimi Eğitimlerimiz (5 farklı eğitim) EYDEM
PDF
Linux Device Driver parallelism using SMP and Kernel Pre-emption
PDF
カスタムメモリマネージャと高速なメモリアロケータについて
DOCX
系統程式 -- 第 11 章 嵌入式系統
PPTX
Linuxのsemaphoreとmutexを見る 
PDF
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
PDF
範囲証明つき準同型暗号とその対話的プロトコル
PDF
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
PPTX
Memory model
PDF
JavaScript難読化読経
ODP
Unityは神,Unrealは現実
PDF
eSIMとは何か
 
PDF
ソフトウェア設計のすすめ
IIJmio meeting 11 HLR/HSS開放とは何か?
イベント駆動プログラミングとI/O多重化
Lisperの見る世界
Basics you should know about UNIX and LINUX
Yet another introduction to Linux RCU
Rustを支える技術
IIJmio meeting #2 技術基準適合証明(技適)と3G/LTEバンドの話
Entegre Lojistik Destek Yönetimi Eğitimlerimiz (5 farklı eğitim) EYDEM
Linux Device Driver parallelism using SMP and Kernel Pre-emption
カスタムメモリマネージャと高速なメモリアロケータについて
系統程式 -- 第 11 章 嵌入式系統
Linuxのsemaphoreとmutexを見る 
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
範囲証明つき準同型暗号とその対話的プロトコル
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
Memory model
JavaScript難読化読経
Unityは神,Unrealは現実
eSIMとは何か
 
ソフトウェア設計のすすめ
Ad

Viewers also liked (20)

PDF
Response Summarizer: An Automatic Summarization System of Call Center Convers...
PDF
対話における商品の営業
PDF
Generation of 3D-avatar animation from latent representations
PDF
Bayesian Dark Knowledge and Matrix Factorization
PDF
Anomaly Detection by ADGM / LVAE
PDF
Imitation Learning for Autonomous Driving in TORCS
PDF
DQN with Differentiable Memory Architectures
PDF
3D Volumetric Data Generation with Generative Adversarial Networks
PDF
On the benchmark of Chainer
PDF
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
PDF
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
PDF
マシンパーセプション研究におけるChainer活用事例
PDF
Chainer Update v1.8.0 -> v1.10.0+
PDF
Chainer, Cupy入門
PDF
NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1
PPTX
Chainerを使って細胞を数えてみた
PDF
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
PDF
ディープラーニングと自動運転、コネクティッドカー @ TU-Automotive 2016
PDF
IPAB2017 深層学習を使った新薬の探索から創造へ
PDF
実世界の人工知能 〜交通,製造業,バイオヘルスケア〜
Response Summarizer: An Automatic Summarization System of Call Center Convers...
対話における商品の営業
Generation of 3D-avatar animation from latent representations
Bayesian Dark Knowledge and Matrix Factorization
Anomaly Detection by ADGM / LVAE
Imitation Learning for Autonomous Driving in TORCS
DQN with Differentiable Memory Architectures
3D Volumetric Data Generation with Generative Adversarial Networks
On the benchmark of Chainer
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
マシンパーセプション研究におけるChainer活用事例
Chainer Update v1.8.0 -> v1.10.0+
Chainer, Cupy入門
NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1
Chainerを使って細胞を数えてみた
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
ディープラーニングと自動運転、コネクティッドカー @ TU-Automotive 2016
IPAB2017 深層学習を使った新薬の探索から創造へ
実世界の人工知能 〜交通,製造業,バイオヘルスケア〜
Ad

Similar to Automatically Fusing Functions on CuPy (20)

KEY
SMP implementation for OpenBSD/sgi
PDF
Applying the paradigms of core.async in Clojure and ClojureScript
PDF
Numba Overview
KEY
Cooking a rabbit pie
PDF
Clojure Conj 2014 - Paradigms of core.async - Julian Gamble
PDF
Asynchronous Programming in Kotlin with Coroutines
PPTX
Gpgpu intro
PDF
How shit works: the CPU
PDF
Practical SPU Programming in God of War III
PDF
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
PDF
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
PDF
GPU Computing for Data Science
PPTX
CPP06 - Functions
PDF
lec02 .pdf
PPTX
1.1-intro.pptx
PDF
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PDF
Parallelism in a NumPy-based program
PDF
Getting Started with MicroPython and LoPy
PPTX
What is jubatus (short)
PDF
Ansible 101 - Presentation at Ansible STL Meetup
SMP implementation for OpenBSD/sgi
Applying the paradigms of core.async in Clojure and ClojureScript
Numba Overview
Cooking a rabbit pie
Clojure Conj 2014 - Paradigms of core.async - Julian Gamble
Asynchronous Programming in Kotlin with Coroutines
Gpgpu intro
How shit works: the CPU
Practical SPU Programming in God of War III
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
GPU Computing for Data Science
CPP06 - Functions
lec02 .pdf
1.1-intro.pptx
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
Parallelism in a NumPy-based program
Getting Started with MicroPython and LoPy
What is jubatus (short)
Ansible 101 - Presentation at Ansible STL Meetup

More from Preferred Networks (20)

PDF
PodSecurityPolicy からGatekeeper に移行しました / Kubernetes Meetup Tokyo #57
PDF
Optunaを使ったHuman-in-the-loop最適化の紹介 - 2023/04/27 W&B 東京ミートアップ #3
PDF
Kubernetes + containerd で cgroup v2 に移行したら "failed to create fsnotify watcher...
PDF
深層学習の新しい応用と、 それを支える計算機の進化 - Preferred Networks CEO 西川徹 (SEMICON Japan 2022 Ke...
PDF
Kubernetes ControllerをScale-Outさせる方法 / Kubernetes Meetup Tokyo #55
PDF
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
PDF
最新リリース:Optuna V3の全て - 2022/12/10 Optuna Meetup #2
PDF
Optuna Dashboardの紹介と設計解説 - 2022/12/10 Optuna Meetup #2
PDF
スタートアップが提案する2030年の材料開発 - 2022/11/11 QPARC講演
PPTX
Deep Learningのための専用プロセッサ「MN-Core」の開発と活用(2022/10/19東大大学院「 融合情報学特別講義Ⅲ」)
PPTX
PFNにおける研究開発(2022/10/19 東大大学院「融合情報学特別講義Ⅲ」)
PDF
自然言語処理を 役立てるのはなぜ難しいのか(2022/10/25東大大学院「自然言語処理応用」)
PDF
Kubernetes にこれから入るかもしれない注目機能!(2022年11月版) / TechFeed Experts Night #7 〜 コンテナ技術を語る
PDF
Matlantis™のニューラルネットワークポテンシャルPFPの適用範囲拡張
PDF
PFNのオンプレ計算機クラスタの取り組み_第55回情報科学若手の会
PDF
続・PFN のオンプレML基盤の取り組み / オンプレML基盤 on Kubernetes 〜PFN、ヤフー〜 #2
PDF
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
PDF
KubeCon + CloudNativeCon Europe 2022 Recap / Kubernetes Meetup Tokyo #51 / #k...
PDF
KubeCon + CloudNativeCon Europe 2022 Recap - Batch/HPCの潮流とScheduler拡張事例 / Kub...
PDF
独断と偏見で選んだ Kubernetes 1.24 の注目機能と今後! / Kubernetes Meetup Tokyo 50
PodSecurityPolicy からGatekeeper に移行しました / Kubernetes Meetup Tokyo #57
Optunaを使ったHuman-in-the-loop最適化の紹介 - 2023/04/27 W&B 東京ミートアップ #3
Kubernetes + containerd で cgroup v2 に移行したら "failed to create fsnotify watcher...
深層学習の新しい応用と、 それを支える計算機の進化 - Preferred Networks CEO 西川徹 (SEMICON Japan 2022 Ke...
Kubernetes ControllerをScale-Outさせる方法 / Kubernetes Meetup Tokyo #55
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
最新リリース:Optuna V3の全て - 2022/12/10 Optuna Meetup #2
Optuna Dashboardの紹介と設計解説 - 2022/12/10 Optuna Meetup #2
スタートアップが提案する2030年の材料開発 - 2022/11/11 QPARC講演
Deep Learningのための専用プロセッサ「MN-Core」の開発と活用(2022/10/19東大大学院「 融合情報学特別講義Ⅲ」)
PFNにおける研究開発(2022/10/19 東大大学院「融合情報学特別講義Ⅲ」)
自然言語処理を 役立てるのはなぜ難しいのか(2022/10/25東大大学院「自然言語処理応用」)
Kubernetes にこれから入るかもしれない注目機能!(2022年11月版) / TechFeed Experts Night #7 〜 コンテナ技術を語る
Matlantis™のニューラルネットワークポテンシャルPFPの適用範囲拡張
PFNのオンプレ計算機クラスタの取り組み_第55回情報科学若手の会
続・PFN のオンプレML基盤の取り組み / オンプレML基盤 on Kubernetes 〜PFN、ヤフー〜 #2
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
KubeCon + CloudNativeCon Europe 2022 Recap / Kubernetes Meetup Tokyo #51 / #k...
KubeCon + CloudNativeCon Europe 2022 Recap - Batch/HPCの潮流とScheduler拡張事例 / Kub...
独断と偏見で選んだ Kubernetes 1.24 の注目機能と今後! / Kubernetes Meetup Tokyo 50

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PDF
KodekX | Application Modernization Development
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Understanding_Digital_Forensics_Presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
KodekX | Application Modernization Development
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Big Data Technologies - Introduction.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology

Automatically Fusing Functions on CuPy