SlideShare a Scribd company logo
1 of 17
TensorFlow
Internal
Hyunghun Cho
(webofthink@snu.ac.kr)
1
Overview
■ Dataflow-like model
■ Runs on a wide variety of different H/W platform
2※ Source: tensorflow.org
※ Source: github.com/zer0n/deepframeworks
Basic concepts
■ Tensor
– definition: an array with more than two axes
– arbitrary dimensionality array
■ Directed graph describes T/F computation
– node: instantiation of an Operation
■ Operation
– an abstract computation
– have attribute(s)
■ Kernel
– particular implementation of an Operation
– run on a type of device (e.g. CPU, GPU)
■ Variable
– special Operation to persistent mutable Tensor
■ Session
– Created to interact with T/F system
3
nodein out
0…* 0…*
※ Source: T/F white paper
Programming Model
■ Example T/F code and corresponding computation graph
■ Single machine and distributed system architecture
4※ Source: T/F white paper
Previous work
■ DistBelief
– Downpour SGD
– Sandblaster L-BFGS
■ Related to
– Project Adam
• MSR
– Parameter
Server project
5
※ Source: Large Scale Distributed Deep Networks
※ Source: parameter server architecture github wiki
※ Source: Project Adam paper
Feature Comparison
Feature
Tensor
Flow
Theano Torch Caffe Chainer CNTK
Run on
Single Machine
O O O O O O
Run on
Distributed
Machines
O X X X X O
Symbolic
differentiation
O O X X O X
Implemented by
C++
O X X O X X
6
※ Source: T/F white paper
■ For detail, refer to Wikipedia
Execution Mode
■ Single Device
■ Multi Device
– Node placement
– Cross-Device Communication
■ Distributed
– Fault Tolerance
• Error handling between Send-Receive node pair
• Periodic health check to worker process
7
Programming Idioms
■ Programming Idioms
– Data Parallel Training
• sequential SGD
– Model Parallel Training
• Recurrent deep LSTM
– Concurrent Steps
8
Code Metrics
■ Source
– https://github.com/tensorflow/tensorflow
■ Code Summary
– Total 114MB
• 3373 files including C/C++, python, HTML, …
– Top 5 languages for implementation
• C++ and Python are the major languages
• Protocol Buffers: provide mechanism for serializing structured data
9
language files blank comment code
C++ 1092 46473 43399 276160
C/C++ Header 779 23457 44727 86274
Python 641 27622 46660 97570
Protocol Buffers 179 2217 7294 8724
Java 167 8296 17325 49374
C# 116 4285 8653 34347
How it works
■ Python-C++ connection with SWIG wrapper
10
[tensorflow.i] [py_func.i]
[py_func.h] [py_func.cc]
v v
Code Structure
■ C++ implementation under /core folder
11
Folder C/C++ Header C++ Protocol Buffers 총합계
./tensorflow/core/client/ 511 511
./tensorflow/core/common_runtime/ 1384 8526 9910
./tensorflow/core/common_runtime/gpu/ 644 3674 4318
./tensorflow/core/distributed_runtime/ 581 2579 3160
./tensorflow/core/distributed_runtime/rpc/ 434 2759 3193
./tensorflow/core/example/ 116 209 45 370
./tensorflow/core/framework/ 3539 14022 451 18012
./tensorflow/core/graph/ 952 5586 6538
./tensorflow/core/kernels/ 9180 42188 11 51379
./tensorflow/core/lib/core/ 573 1240 25 1838
./tensorflow/core/lib/gtl/ 1452 1943 3395
./tensorflow/core/lib/hash/ 36 400 436
./tensorflow/core/lib/histogram/ 60 324 384
./tensorflow/core/lib/io/ 340 2134 2474
./tensorflow/core/lib/jpeg/ 78 767 845
./tensorflow/core/lib/png/ 37 311 348
./tensorflow/core/lib/random/ 690 856 1546
./tensorflow/core/lib/strings/ 532 3111 3643
./tensorflow/core/lib/wav/ 13 166 179
./tensorflow/core/ops/ 9346 9346
./tensorflow/core/ops/compat/ 25 204 229
./tensorflow/core/platform/ 805 738 1543
./tensorflow/core/platform/default/ 349 290 639
./tensorflow/core/platform/posix/ 31 656 687
./tensorflow/core/protobuf/ 333 333
./tensorflow/core/public/ 202 202
./tensorflow/core/user_ops/ 20 20
./tensorflow/core/util/ 1354 4426 170 5950
./tensorflow/core/util/ctc/ 600 298 898
./tensorflow/core/util/sparse/ 504 498 1002
총합계 24511 107782 1035 133328
C++ framework
■ Key classes
12
C++ kernels
■ Inherit from OpKernel
■ Kernel is implemented per CPU / GPU [How to]
– GPU version uses CUDA library
13
[constant_op.h]
[constant_op.cc]
[constant_op_gpu.cu.cc]
Code Structure
■ Python implementation under /python folder
14
Folder C/C++ Header C++ Protocol Buffers Python 총합계
./tensorflow/python/ 168 168
./tensorflow/python/client/ 33 475 2031 2539
./tensorflow/python/framework/ 13 686 7097 7796
./tensorflow/python/kernel_tests/ 25391 25391
./tensorflow/python/lib/core/ 26 316 342
./tensorflow/python/lib/io/ 52 75 31 158
./tensorflow/python/ops/ 14995 14995
./tensorflow/python/platform/ 888 888
./tensorflow/python/platform/default
/
389 389
./tensorflow/python/summary/ 1168 1168
./tensorflow/python/summary/impl/ 693 693
./tensorflow/python/tools/ 280 280
./tensorflow/python/training/ 6 7732 7738
./tensorflow/python/user_ops/ 7 7
./tensorflow/python/util/ 51 51
총합계 124 1552 6 60921 62603
Python Implementation
■ Operations
■ Trainings
15
Code Summary
■ The Python part
– Various operations and trainings
– API:
• the most complete and the easiest to use
■ The C++ part
– Framework and kernel functions
– API:
• offer some performance advantages
• supports deployment to small devices such as Android
16
Meta Framework
■ Keras
■ TensorFlow Slim
– a lightweight library for defining, training and evaluating models
■ Skflow
– provide Scikit Learn style API
■ PrettyTensor
– support a chainable object syntax to quickly define neural networks
■ TFLearn
– a modular and transparent deep learning library
17

More Related Content

What's hot

Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentationSulemanAliMalik
 
오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개SungTae Moon
 
TFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesTFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesKoan-Sin Tan
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security InternalsOpersys inc.
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 IntroductionSperasoft
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLinaro
 
Presentasi Multicore Prosessor
Presentasi Multicore ProsessorPresentasi Multicore Prosessor
Presentasi Multicore ProsessorHeru Khaerudin
 
Unreal Engine Beginner Workshop Slides
Unreal Engine Beginner Workshop SlidesUnreal Engine Beginner Workshop Slides
Unreal Engine Beginner Workshop SlidesMerlin Cheng
 
Kernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesRyo Jin
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 
Linux rt in financial markets
Linux rt in financial marketsLinux rt in financial markets
Linux rt in financial marketsAdrien Mahieux
 
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat Lunak
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat LunakEAS MPPL - E Dokumen Perencanaan Proyek Perangkat Lunak
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat LunakBintangNuralamsyah1
 
Qt State Machine Framework
Qt State Machine FrameworkQt State Machine Framework
Qt State Machine Frameworkaccount inactive
 
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI Inferencing
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI InferencingInnovative Solutions for Cloud Gaming, Media, Transcoding, & AI Inferencing
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI InferencingRebekah Rodriguez
 
EB corbos and the L4Re microhypervisor: Open-source automotive safety
EB corbos and the L4Re microhypervisor: Open-source automotive safetyEB corbos and the L4Re microhypervisor: Open-source automotive safety
EB corbos and the L4Re microhypervisor: Open-source automotive safetyAlexander Much
 

What's hot (20)

Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개
 
IBM Power10.pdf
IBM Power10.pdfIBM Power10.pdf
IBM Power10.pdf
 
TFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesTFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU Delegates
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security Internals
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 
Presentasi Multicore Prosessor
Presentasi Multicore ProsessorPresentasi Multicore Prosessor
Presentasi Multicore Prosessor
 
Unreal Engine Beginner Workshop Slides
Unreal Engine Beginner Workshop SlidesUnreal Engine Beginner Workshop Slides
Unreal Engine Beginner Workshop Slides
 
Kernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded Devices
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Linux rt in financial markets
Linux rt in financial marketsLinux rt in financial markets
Linux rt in financial markets
 
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat Lunak
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat LunakEAS MPPL - E Dokumen Perencanaan Proyek Perangkat Lunak
EAS MPPL - E Dokumen Perencanaan Proyek Perangkat Lunak
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
 
Introduction to BeagleBone Black
Introduction to BeagleBone BlackIntroduction to BeagleBone Black
Introduction to BeagleBone Black
 
Qt State Machine Framework
Qt State Machine FrameworkQt State Machine Framework
Qt State Machine Framework
 
training report
training reporttraining report
training report
 
Jupiterz 20045 tp4-5tp5
Jupiterz 20045 tp4-5tp5Jupiterz 20045 tp4-5tp5
Jupiterz 20045 tp4-5tp5
 
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI Inferencing
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI InferencingInnovative Solutions for Cloud Gaming, Media, Transcoding, & AI Inferencing
Innovative Solutions for Cloud Gaming, Media, Transcoding, & AI Inferencing
 
EB corbos and the L4Re microhypervisor: Open-source automotive safety
EB corbos and the L4Re microhypervisor: Open-source automotive safetyEB corbos and the L4Re microhypervisor: Open-source automotive safety
EB corbos and the L4Re microhypervisor: Open-source automotive safety
 

Viewers also liked

파알못의 파이썬 크롤러 이해하기
파알못의 파이썬 크롤러 이해하기파알못의 파이썬 크롤러 이해하기
파알못의 파이썬 크롤러 이해하기Hyeyeon Yang
 
배워봅시다 머신러닝 with TensorFlow
배워봅시다 머신러닝 with TensorFlow배워봅시다 머신러닝 with TensorFlow
배워봅시다 머신러닝 with TensorFlowJang Hoon
 
Howto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHowto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHyo jeong Lee
 
텐서플로 걸음마 (TensorFlow Tutorial)
텐서플로 걸음마 (TensorFlow Tutorial)텐서플로 걸음마 (TensorFlow Tutorial)
텐서플로 걸음마 (TensorFlow Tutorial)Taejun Kim
 
Deep dive into deeplearn.js
Deep dive into deeplearn.jsDeep dive into deeplearn.js
Deep dive into deeplearn.jsKai Sasaki
 
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016Taehoon Kim
 

Viewers also liked (6)

파알못의 파이썬 크롤러 이해하기
파알못의 파이썬 크롤러 이해하기파알못의 파이썬 크롤러 이해하기
파알못의 파이썬 크롤러 이해하기
 
배워봅시다 머신러닝 with TensorFlow
배워봅시다 머신러닝 with TensorFlow배워봅시다 머신러닝 with TensorFlow
배워봅시다 머신러닝 with TensorFlow
 
Howto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHowto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear Regression
 
텐서플로 걸음마 (TensorFlow Tutorial)
텐서플로 걸음마 (TensorFlow Tutorial)텐서플로 걸음마 (TensorFlow Tutorial)
텐서플로 걸음마 (TensorFlow Tutorial)
 
Deep dive into deeplearn.js
Deep dive into deeplearn.jsDeep dive into deeplearn.js
Deep dive into deeplearn.js
 
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016
텐서플로우 설치도 했고 튜토리얼도 봤고 기초 예제도 짜봤다면 TensorFlow KR Meetup 2016
 

Similar to Tensorflow internal

Rlite software-architecture (1)
Rlite software-architecture (1)Rlite software-architecture (1)
Rlite software-architecture (1)ARCFIRE ICT
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLinaro
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing ToolsSysdig
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaRedis Labs
 
Continuous Go Profiling & Observability
Continuous Go Profiling & ObservabilityContinuous Go Profiling & Observability
Continuous Go Profiling & ObservabilityScyllaDB
 
MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103Linaro
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!Linaro
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchChun Ming Ou
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionCherryBerry2
 
Fletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAFletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAGanesan Narayanasamy
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
3.2 process text streams using filters
3.2 process text streams using filters3.2 process text streams using filters
3.2 process text streams using filtersAcácio Oliveira
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threadingAntonio Cesarano
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing ToolsBrendan Gregg
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLinaro
 
1032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.21032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.2Stanley Ho
 
Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005dflexer
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin敬倫 林
 

Similar to Tensorflow internal (20)

Rlite software-architecture (1)
Rlite software-architecture (1)Rlite software-architecture (1)
Rlite software-architecture (1)
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
 
Continuous Go Profiling & Observability
Continuous Go Profiling & ObservabilityContinuous Go Profiling & Observability
Continuous Go Profiling & Observability
 
MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Using Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalightUsing Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalight
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable Switch
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
 
Fletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAFletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGA
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
3.2 process text streams using filters
3.2 process text streams using filters3.2 process text streams using filters
3.2 process text streams using filters
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threading
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
1032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.21032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.2
 
Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
 

More from Hyunghun Cho

2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?
2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?
2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?Hyunghun Cho
 
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여Hyunghun Cho
 
Do IoT Yourself 3rd : Open API - revision 3
Do IoT Yourself 3rd : Open API - revision 3Do IoT Yourself 3rd : Open API - revision 3
Do IoT Yourself 3rd : Open API - revision 3Hyunghun Cho
 
IoT Web App - 수집된 정보의 가공, 처리, 융합
IoT Web App - 수집된 정보의 가공, 처리, 융합IoT Web App - 수집된 정보의 가공, 처리, 융합
IoT Web App - 수집된 정보의 가공, 처리, 융합Hyunghun Cho
 
Do IoT Yourself! - 사물 간의 연결을 위한 Open API
Do IoT Yourself! - 사물 간의 연결을 위한 Open APIDo IoT Yourself! - 사물 간의 연결을 위한 Open API
Do IoT Yourself! - 사물 간의 연결을 위한 Open APIHyunghun Cho
 
IoT, 기술의 혁신과 미래 그리고 통찰
IoT, 기술의 혁신과 미래 그리고 통찰IoT, 기술의 혁신과 미래 그리고 통찰
IoT, 기술의 혁신과 미래 그리고 통찰Hyunghun Cho
 
GameTube app-swing-introduction
GameTube app-swing-introductionGameTube app-swing-introduction
GameTube app-swing-introductionHyunghun Cho
 
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHome sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHyunghun Cho
 
REST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentREST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentHyunghun Cho
 

More from Hyunghun Cho (9)

2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?
2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?
2018 소프트웨어에 물들다 - 기계는 어떻게 생각할까?
 
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여
Somul 2017 소프트웨어, 사람과 사물의 소통을 향하여
 
Do IoT Yourself 3rd : Open API - revision 3
Do IoT Yourself 3rd : Open API - revision 3Do IoT Yourself 3rd : Open API - revision 3
Do IoT Yourself 3rd : Open API - revision 3
 
IoT Web App - 수집된 정보의 가공, 처리, 융합
IoT Web App - 수집된 정보의 가공, 처리, 융합IoT Web App - 수집된 정보의 가공, 처리, 융합
IoT Web App - 수집된 정보의 가공, 처리, 융합
 
Do IoT Yourself! - 사물 간의 연결을 위한 Open API
Do IoT Yourself! - 사물 간의 연결을 위한 Open APIDo IoT Yourself! - 사물 간의 연결을 위한 Open API
Do IoT Yourself! - 사물 간의 연결을 위한 Open API
 
IoT, 기술의 혁신과 미래 그리고 통찰
IoT, 기술의 혁신과 미래 그리고 통찰IoT, 기술의 혁신과 미래 그리고 통찰
IoT, 기술의 혁신과 미래 그리고 통찰
 
GameTube app-swing-introduction
GameTube app-swing-introductionGameTube app-swing-introduction
GameTube app-swing-introduction
 
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHome sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
 
REST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentREST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side Development
 

Recently uploaded

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 

Recently uploaded (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 

Tensorflow internal

  • 2. Overview ■ Dataflow-like model ■ Runs on a wide variety of different H/W platform 2※ Source: tensorflow.org ※ Source: github.com/zer0n/deepframeworks
  • 3. Basic concepts ■ Tensor – definition: an array with more than two axes – arbitrary dimensionality array ■ Directed graph describes T/F computation – node: instantiation of an Operation ■ Operation – an abstract computation – have attribute(s) ■ Kernel – particular implementation of an Operation – run on a type of device (e.g. CPU, GPU) ■ Variable – special Operation to persistent mutable Tensor ■ Session – Created to interact with T/F system 3 nodein out 0…* 0…* ※ Source: T/F white paper
  • 4. Programming Model ■ Example T/F code and corresponding computation graph ■ Single machine and distributed system architecture 4※ Source: T/F white paper
  • 5. Previous work ■ DistBelief – Downpour SGD – Sandblaster L-BFGS ■ Related to – Project Adam • MSR – Parameter Server project 5 ※ Source: Large Scale Distributed Deep Networks ※ Source: parameter server architecture github wiki ※ Source: Project Adam paper
  • 6. Feature Comparison Feature Tensor Flow Theano Torch Caffe Chainer CNTK Run on Single Machine O O O O O O Run on Distributed Machines O X X X X O Symbolic differentiation O O X X O X Implemented by C++ O X X O X X 6 ※ Source: T/F white paper ■ For detail, refer to Wikipedia
  • 7. Execution Mode ■ Single Device ■ Multi Device – Node placement – Cross-Device Communication ■ Distributed – Fault Tolerance • Error handling between Send-Receive node pair • Periodic health check to worker process 7
  • 8. Programming Idioms ■ Programming Idioms – Data Parallel Training • sequential SGD – Model Parallel Training • Recurrent deep LSTM – Concurrent Steps 8
  • 9. Code Metrics ■ Source – https://github.com/tensorflow/tensorflow ■ Code Summary – Total 114MB • 3373 files including C/C++, python, HTML, … – Top 5 languages for implementation • C++ and Python are the major languages • Protocol Buffers: provide mechanism for serializing structured data 9 language files blank comment code C++ 1092 46473 43399 276160 C/C++ Header 779 23457 44727 86274 Python 641 27622 46660 97570 Protocol Buffers 179 2217 7294 8724 Java 167 8296 17325 49374 C# 116 4285 8653 34347
  • 10. How it works ■ Python-C++ connection with SWIG wrapper 10 [tensorflow.i] [py_func.i] [py_func.h] [py_func.cc] v v
  • 11. Code Structure ■ C++ implementation under /core folder 11 Folder C/C++ Header C++ Protocol Buffers 총합계 ./tensorflow/core/client/ 511 511 ./tensorflow/core/common_runtime/ 1384 8526 9910 ./tensorflow/core/common_runtime/gpu/ 644 3674 4318 ./tensorflow/core/distributed_runtime/ 581 2579 3160 ./tensorflow/core/distributed_runtime/rpc/ 434 2759 3193 ./tensorflow/core/example/ 116 209 45 370 ./tensorflow/core/framework/ 3539 14022 451 18012 ./tensorflow/core/graph/ 952 5586 6538 ./tensorflow/core/kernels/ 9180 42188 11 51379 ./tensorflow/core/lib/core/ 573 1240 25 1838 ./tensorflow/core/lib/gtl/ 1452 1943 3395 ./tensorflow/core/lib/hash/ 36 400 436 ./tensorflow/core/lib/histogram/ 60 324 384 ./tensorflow/core/lib/io/ 340 2134 2474 ./tensorflow/core/lib/jpeg/ 78 767 845 ./tensorflow/core/lib/png/ 37 311 348 ./tensorflow/core/lib/random/ 690 856 1546 ./tensorflow/core/lib/strings/ 532 3111 3643 ./tensorflow/core/lib/wav/ 13 166 179 ./tensorflow/core/ops/ 9346 9346 ./tensorflow/core/ops/compat/ 25 204 229 ./tensorflow/core/platform/ 805 738 1543 ./tensorflow/core/platform/default/ 349 290 639 ./tensorflow/core/platform/posix/ 31 656 687 ./tensorflow/core/protobuf/ 333 333 ./tensorflow/core/public/ 202 202 ./tensorflow/core/user_ops/ 20 20 ./tensorflow/core/util/ 1354 4426 170 5950 ./tensorflow/core/util/ctc/ 600 298 898 ./tensorflow/core/util/sparse/ 504 498 1002 총합계 24511 107782 1035 133328
  • 12. C++ framework ■ Key classes 12
  • 13. C++ kernels ■ Inherit from OpKernel ■ Kernel is implemented per CPU / GPU [How to] – GPU version uses CUDA library 13 [constant_op.h] [constant_op.cc] [constant_op_gpu.cu.cc]
  • 14. Code Structure ■ Python implementation under /python folder 14 Folder C/C++ Header C++ Protocol Buffers Python 총합계 ./tensorflow/python/ 168 168 ./tensorflow/python/client/ 33 475 2031 2539 ./tensorflow/python/framework/ 13 686 7097 7796 ./tensorflow/python/kernel_tests/ 25391 25391 ./tensorflow/python/lib/core/ 26 316 342 ./tensorflow/python/lib/io/ 52 75 31 158 ./tensorflow/python/ops/ 14995 14995 ./tensorflow/python/platform/ 888 888 ./tensorflow/python/platform/default / 389 389 ./tensorflow/python/summary/ 1168 1168 ./tensorflow/python/summary/impl/ 693 693 ./tensorflow/python/tools/ 280 280 ./tensorflow/python/training/ 6 7732 7738 ./tensorflow/python/user_ops/ 7 7 ./tensorflow/python/util/ 51 51 총합계 124 1552 6 60921 62603
  • 16. Code Summary ■ The Python part – Various operations and trainings – API: • the most complete and the easiest to use ■ The C++ part – Framework and kernel functions – API: • offer some performance advantages • supports deployment to small devices such as Android 16
  • 17. Meta Framework ■ Keras ■ TensorFlow Slim – a lightweight library for defining, training and evaluating models ■ Skflow – provide Scikit Learn style API ■ PrettyTensor – support a chainable object syntax to quickly define neural networks ■ TFLearn – a modular and transparent deep learning library 17