{"id":261,"date":"2019-02-25T10:29:42","date_gmt":"2019-02-25T09:29:42","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/"},"modified":"2020-01-31T11:29:09","modified_gmt":"2020-01-31T10:29:09","slug":"tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/","title":{"rendered":"Tensor Processing Units: enabling the next generation of fast, affordable AI"},"content":{"rendered":"<p><span class=\"firstcharacter\">L<\/span>egend says it was written on the back of a napkin. In 2013 Jeff Dean, <span id=\"urn:batch-analysis-7244014e-311f-4f04-9a73-d67be7397a10\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span>&#8216;s Head of AI, did some calculations and realized that if all the Android users in the world used their smartphone <span id=\"urn:batch-analysis-a1e1696d-b8f6-42f6-a163-f285cc5bd400\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/speech\">speech<\/span> to text feature for one minute each day, they would consume more of the all compute resource than all <span id=\"urn:batch-analysis-38459b89-909e-4804-9020-9fe98da5aa48\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> data centres around the world (at that time).<\/p>\n<p>Part of the reason of this situation was and is related to the evolution of computer processors and chips (Moore&#8217;s law) as well as to the exponential growth of use cases, devices and connectivity.<\/p>\n<p>From here emerges the need in the present day of more specialised hardware, domain specific hardware, whether it&#8217;s related photo recognition via AI or query processing in big data land.<\/p>\n<p><span id=\"urn:batch-analysis-22d20370-86b2-418e-9b1c-e3daca0b7456\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span>&#8216;s TPUs are domain specific hardware for <span id=\"urn:batch-analysis-6d823a61-d89d-4aea-8cec-48438b1a92b0\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/machine_learning\">machine learning<\/span>, a <span id=\"urn:batch-analysis-01ba2efd-a3fb-4558-8417-cd47cabbe5a5\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> started in 2013, first deployed in 2015 with TPU v1. <a href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\" target=\"_blank\" rel=\"noopener noreferrer\">Yufeng Guo<\/a>, Developer Advocate at <span id=\"urn:batch-analysis-33a9075d-9f1a-4ae4-b5c9-23552b120b16\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span>, told at <a href=\"https:\/\/milan2018.codemotionworld.com\/conference\/\" target=\"_blank\" rel=\"noopener noreferrer\">Codemotion Milan 2018<\/a> about the characteristics and evolution of TPUs and how this product represents a real accelerator for <span id=\"urn:batch-analysis-ab3c223a-9454-4581-8518-17995b53adbf\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/machine_learning\">machine learning<\/span>.<\/p>\n<h2>Early days of TPU v1<\/h2>\n<p>The v1 is still in use, but was not released publicly. It&#8217;s basically a PCI Express slot, suited for existing hardware datacenter infrastructure, and was used for Search (search ranking, speech recognition), Translate (text, graphic and speech) and Photo (photo search) &#8211; i.e. <span id=\"urn:batch-analysis-79fd9c1a-7d55-414d-a925-a6c7de8e98bf\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> products performing large ML task with a lot of users at that time.<br \/>\n<a style=\"width: 300px; height: 110px;\" href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\"><img decoding=\"async\" class=\"aligncenter wp-image-2474 size-full\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/v1_and_v2.png\" alt=\"\" \/><\/a><br \/>\nIt is an early stage product; for example it only makes predictions (a.k.a. inference), not training. However, it was the foundation of a different kind of hardware for <span id=\"urn:batch-analysis-6bd8e135-141b-4b43-91ab-a969ed0b8518\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/machine_learning\">machine learning<\/span>.<\/p>\n<p>In fact, although reading the specifications could be that the TPU v1 was equipped with a slow chip if compared with other available processors, the <span id=\"urn:batch-analysis-8278b780-1c90-4c75-98d7-7bac01aa4b67\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span> in terms of calculation and watts consumed tell a different story.<\/p>\n<p>The starting point for the chip and board implementation is the fact that the neural networks are basically a series of multiplication and addition operations. Hence two insights: on the one hand the fact that it is possible to operate these operations by matrix calculation, on the other the fact that neural networks allow some kind of fuzzy math.<\/p>\n<p>In realizing the v1 chip, the choice was to invest in a processor capable of running quickly on matrices and to reduce precision through quantization, operating on 8-bit integers instead of 32-point floating points. Moreover, operating on matrices of <span id=\"urn:batch-analysis-0cebae86-cf34-4d68-a88c-540c8ba4a924\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> &#8211; systolic arrays &#8211; reduces the reading and storing data cycles. These design choices allow, among other things, to have 25 times the number of multipliers &#8211; compared to other similar processors &#8211; in a smaller chip, with less heat produced, less silicon need.<br \/>\n<a style=\"width: 300px; height: 110px;\" href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\"><img decoding=\"async\" class=\"aligncenter wp-image-2474 size-full\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/quantization.png\" alt=\"\" \/><\/a><br \/>\nSo while the v1 runs at 700Mhz and has no threading, no multi-processing, no branch prediction, it was able to process a very large amount of <span id=\"urn:batch-analysis-7172c0a4-6380-4bbc-8184-96de5a37350d\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> per second.<\/p>\n<h2>Evolving in v2 and v3 for learning<\/h2>\n<p><span id=\"urn:batch-analysis-2cacb44e-e7d5-4771-99f0-7dbca2cca305\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> teams quickly iterated over it and made TPU v2 in 2017. It was a bigger board, providing four processors instead of just one, with big heatsink, and loaded into dedicated infrastructure and hardware for holding in datacentre.<\/p>\n<p>TPU v2 was designed to perform both inference and learning tasks. The computations necessary for learning have different <span id=\"urn:batch-analysis-a6e5ca4a-bc4b-4b0a-85ed-de9fe67ad3fb\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/requirement\">requirements<\/span> than those for prediction; more precision is needed (therefore a less aggressive quantisation of data), maintaining and possibly improving the speed and space required.<\/p>\n<p>So, how can you have good <span id=\"urn:batch-analysis-be76efff-8c18-4b39-9907-e408037aeb1a\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span> without losing the necessary precision that means the training doesn\u2019t fall apart? It\u2019s simple: invent a new float type, bfloat16. bfloat or brain float, allows within 16 bit the same full range of values of standard float 32 (from 1E-38 to 1E+38), by dropping the decimals.<br \/>\n<a style=\"width: 300px; height: 110px;\" href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\"><img decoding=\"async\" class=\"aligncenter wp-image-2474 size-full\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/bfloat.png\" alt=\"\" \/><\/a><br \/>\nIn 2018 <span id=\"urn:batch-analysis-140e90ea-bf9a-4875-87f8-c62a16aa2369\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> released TPU v3, with improvement on heat sink system and, of course, in <span id=\"urn:batch-analysis-5df2c792-bcf8-4220-8e64-871456027a7a\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span>.<\/p>\n<h2>Use a TPU Pod<\/h2>\n<p>TPU boards are used in a distributed system known as TPU Pod, that hosts 64 TPUs. All those TPUs are connected to their own dedicated host: no CPU, no main memory, no disk.<br \/>\n<a style=\"width: 300px; height: 110px;\" href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\"><img decoding=\"async\" class=\"aligncenter wp-image-2474 size-full\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/datacenter.png\" alt=\"\" \/><\/a><br \/>\nThis configuration allows to use a full Pod or a subsection of a Pod as one machine. Your code for one TPU is essentially the same as for all 64 TPUs in a Pod. Dedicated compilers will take care of it. The advantage of this configuration is that you can choose how much per hour paid resources you want to allocate, reducing or increasing the time required to perform the learning phase. A learning task that could require about 10 hours running on a single TPU, goes down to 30 minutes if using half a POD.<\/p>\n<p>Programming for TPU with TensorFlow framework was also made simpler by <span id=\"urn:batch-analysis-fc8968c9-e354-4588-8f27-9af3d784dab3\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span>. The same <span id=\"urn:batch-analysis-4b35a4ae-2860-45bb-9040-0d2cb5048f0e\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/codebase\">codebase<\/span> and the same API can be used when running the code on different targets (local workstation, TPU, TPU Pod), just change to the specialised estimator for TPU.<br \/>\n<a style=\"width: 300px; height: 110px;\" href=\"https:\/\/milan2018.codemotionworld.com\/speaker\/2134\/\"><img decoding=\"async\" class=\"aligncenter wp-image-2474 size-full\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/code_snippet.png\" alt=\"\" \/><\/a><br \/>\nTPUs can be used effectively when there is a the need for tons of matrix operations or large models with large batch sizes. For instance, they are really good at processing images data, but you can take you own your non-image <span id=\"urn:batch-analysis-80a2b6ff-25ff-4e51-84da-214993fd28d8\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> and turn them into formats, structures that are more suitable for pushing through the TPUs.<\/p>\n<p>The high optimisation of operations on TPU matrices also means that to have the best <span id=\"urn:batch-analysis-157adedf-cab2-43c2-86a3-d28be3009136\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span>, it is useful to consider the actual size of the matrix in the chip. Having to process a batch of images, all of a certain size in pixels except one that it\u2019s just one pixel bigger, it would be more efficient to cut away that extra pixel before processing the <span id=\"urn:batch-analysis-9c6516db-1962-4f59-8e14-6d2a2a2d9e5a\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> from the TPUs.<\/p>\n<p>While it\u2019s not like using microcode for programming chips, it\u2019s also true that this kind of domain specific hardware could require a <span id=\"urn:batch-analysis-204a68fa-6e34-4a00-8b8e-a16fe977576c\" class=\"textannotation disambiguated wl-no-link wl-other\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/knowledge\">knowledge<\/span> of how it works internally to get the best from it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Legend says it was written on the back of a napkin. In 2013 Jeff Dean, Google&#8216;s Head of AI, did some calculations and realized that if all the Android users in the world used their smartphone speech to text feature for one minute each day, they would consume more of the all compute resource than&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/\">Read more<\/a><\/p>\n","protected":false},"author":30,"featured_media":262,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[35],"tags":[22],"collections":[],"class_list":{"0":"post-261","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-machine-learning","8":"tag-codemotion-milan","9":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Tensor Processing Units: enabling the next generation of fast, affordable AI - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tensor Processing Units: enabling the next generation of fast, affordable AI\" \/>\n<meta property=\"og:description\" content=\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-25T09:29:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-31T10:29:09+00:00\" \/>\n<meta name=\"author\" content=\"Luca Ferretti\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Luca Ferretti\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/\"},\"author\":{\"name\":\"Luca Ferretti\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/00344cc4e23bb0758378ab701b57f1a1\"},\"headline\":\"Tensor Processing Units: enabling the next generation of fast, affordable AI\",\"datePublished\":\"2019-02-25T09:29:42+00:00\",\"dateModified\":\"2020-01-31T10:29:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/\"},\"wordCount\":980,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/tpu-V2-hero.width-1000.png\",\"keywords\":[\"Codemotion Milan\"],\"articleSection\":[\"Machine Learning\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/\",\"name\":\"Tensor Processing Units: enabling the next generation of fast, affordable AI - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/tpu-V2-hero.width-1000.png\",\"datePublished\":\"2019-02-25T09:29:42+00:00\",\"dateModified\":\"2020-01-31T10:29:09+00:00\",\"description\":\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/tpu-V2-hero.width-1000.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/tpu-V2-hero.width-1000.png\",\"width\":975,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI\\\/ML\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Machine Learning\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/ai-ml\\\/machine-learning\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Tensor Processing Units: enabling the next generation of fast, affordable AI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Codemotion.Italy\\\/\",\"https:\\\/\\\/x.com\\\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/00344cc4e23bb0758378ab701b57f1a1\",\"name\":\"Luca Ferretti\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g\",\"caption\":\"Luca Ferretti\"},\"description\":\"Affezionato al caro vecchio C, passato non troppo recentemente alle pi\u00c3\u00b9 arzigogolate frontiere del Web, Luca Ferretti ha da poco scelto il suo motto su Twitter: I break stuff, I build relationships. \u00c3\u02c6 cos\u00c3\u00ac, tra una ispezione del DOM e una apparizione nella stanza accanto per discutere con il team del frontend di un pixel messo storto, tra una traduzione di Ubuntu e un rebuild dei sorgenti di GNOME (rigorosamente di notte), che trascorre le sue giornate nell'incessante ricerca della perfezione ;-)\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/author\\\/luca-ferretti\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Tensor Processing Units: enabling the next generation of fast, affordable AI - Codemotion Magazine","description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/","og_locale":"en_US","og_type":"article","og_title":"Tensor Processing Units: enabling the next generation of fast, affordable AI","og_description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","og_url":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2019-02-25T09:29:42+00:00","article_modified_time":"2020-01-31T10:29:09+00:00","author":"Luca Ferretti","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Luca Ferretti","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/"},"author":{"name":"Luca Ferretti","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/00344cc4e23bb0758378ab701b57f1a1"},"headline":"Tensor Processing Units: enabling the next generation of fast, affordable AI","datePublished":"2019-02-25T09:29:42+00:00","dateModified":"2020-01-31T10:29:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/"},"wordCount":980,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png","keywords":["Codemotion Milan"],"articleSection":["Machine Learning"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/","url":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/","name":"Tensor Processing Units: enabling the next generation of fast, affordable AI - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png","datePublished":"2019-02-25T09:29:42+00:00","dateModified":"2020-01-31T10:29:09+00:00","description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png","width":975,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/tensor-processing-units-enabling-the-next-generation-of-fast-affordable-ai\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"AI\/ML","item":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/"},{"@type":"ListItem","position":3,"name":"Machine Learning","item":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/"},{"@type":"ListItem","position":4,"name":"Tensor Processing Units: enabling the next generation of fast, affordable AI"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/00344cc4e23bb0758378ab701b57f1a1","name":"Luca Ferretti","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a7c16ad1483e63c6ae25d1370bfab6252a285d959ed68a5e385f98e66f0b420a?s=96&d=mm&r=g","caption":"Luca Ferretti"},"description":"Affezionato al caro vecchio C, passato non troppo recentemente alle pi\u00c3\u00b9 arzigogolate frontiere del Web, Luca Ferretti ha da poco scelto il suo motto su Twitter: I break stuff, I build relationships. \u00c3\u02c6 cos\u00c3\u00ac, tra una ispezione del DOM e una apparizione nella stanza accanto per discutere con il team del frontend di un pixel messo storto, tra una traduzione di Ubuntu e un rebuild dei sorgenti di GNOME (rigorosamente di notte), che trascorre le sue giornate nell'incessante ricerca della perfezione ;-)","url":"https:\/\/www.codemotion.com\/magazine\/author\/luca-ferretti\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-600x400.png","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-600x600.png","author_info":{"display_name":"Luca Ferretti","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/luca-ferretti\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png",975,675,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-150x150.png",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-300x208.png",300,208,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-768x532.png",768,532,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png",975,675,false],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png",975,675,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png",975,675,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000.png",100,69,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-180x128.png",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-896x504.png",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-400x225.png",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-600x400.png",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/02\/tpu-V2-hero.width-1000-600x600.png",600,600,true]},"uagb_author_info":{"display_name":"Luca Ferretti","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/luca-ferretti\/"},"uagb_comment_info":0,"uagb_excerpt":"Legend says it was written on the back of a napkin. In 2013 Jeff Dean, Google&#8216;s Head of AI, did some calculations and realized that if all the Android users in the world used their smartphone speech to text feature for one minute each day, they would consume more of the all compute resource than&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":4,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":3130,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/261\/revisions\/3130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/262"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=261"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}