<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Ferreto on Medium]]></title>
        <description><![CDATA[Stories by Daniel Ferreto on Medium]]></description>
        <link>https://medium.com/@theraddani?source=rss-2eb3f81cbd06------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZrJwfSMjST-1bzV9</url>
            <title>Stories by Daniel Ferreto on Medium</title>
            <link>https://medium.com/@theraddani?source=rss-2eb3f81cbd06------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:01:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@theraddani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[NUMA-Aware Architectures: Enhancing Locality and LLC Accesses in CPU Hyperthreading for PyTorch]]></title>
            <link>https://theraddani.medium.com/numa-aware-architectures-enhancing-locality-and-llc-accesses-in-cpu-hyperthreading-for-pytorch-323037664700?source=rss-2eb3f81cbd06------2</link>
            <guid isPermaLink="false">https://medium.com/p/323037664700</guid>
            <category><![CDATA[computer-architecture]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[pytorch]]></category>
            <dc:creator><![CDATA[Daniel Ferreto]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 02:44:45 GMT</pubDate>
            <atom:updated>2024-11-01T02:44:45.186Z</atom:updated>
            <content:encoded><![CDATA[<p>In the landscape of deep learning and high-performance computing, optimizing hardware utilization is crucial for maximizing model training and inference speed. Non-Uniform Memory Access (NUMA)-aware architectures are particularly beneficial in hyperthreaded CPU setups, where locality and Last Level Cache (LLC) accesses play a critical role in minimizing latency and maximizing data throughput. In this article, we explore how NUMA-aware architectures can improve CPU-based deep learning workloads in PyTorch, focusing on locality, LLC optimization, and hyperthreading efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*MWAFNBmPJAu61WoiLYoXqA.png" /></figure><h3>Understanding NUMA and Its Implications for CPU Workloads</h3><p>NUMA (Non-Uniform Memory Access) is a memory design used in multi-core processors, where memory is divided into zones called nodes, each associated with a specific processor. In a NUMA setup, each CPU core has faster access to its local memory node and slower access to memory nodes associated with other cores. This can lead to significant performance improvements if data locality is carefully managed, as cores will access memory on their local node rather than competing for non-local memory access.</p><p>For CPU hyperthreading, managing memory locality is essential. Hyperthreading allows a single physical core to run multiple threads, sharing resources like cache and memory access paths. When workloads are not NUMA-aware, threads may end up accessing data stored in non-local nodes, causing increased memory access latency and LLC misses, negatively impacting performance.</p><h3>Benefits of NUMA-Aware Architectures for Deep Learning</h3><p>NUMA-aware architectures offer several advantages for CPU-based deep learning workloads in frameworks like PyTorch:</p><ol><li><strong>Improved Data Locality:</strong> By ensuring that data is allocated in the memory node closest to the CPU cores processing it, NUMA-aware architectures reduce latency. This is particularly beneficial for large tensor operations in PyTorch, as it minimizes the need for inter-node memory transfers.</li><li><strong>Optimized Last Level Cache (LLC) Usage:</strong> The Last Level Cache (LLC) is the largest cache in the CPU hierarchy and is shared among multiple cores. With NUMA-awareness, LLC misses can be reduced by maintaining data locality, leading to fewer cache coherence traffic and better cache utilization. This is particularly impactful in hyperthreaded setups, where LLC contention can otherwise become a bottleneck.</li><li><strong>Enhanced Hyperthreading Efficiency:</strong> By keeping threads and their associated data on the same NUMA node, NUMA-awareness can reduce contention for memory bandwidth between threads sharing the same physical core. This can lead to improved throughput and lower memory access latency in hyperthreaded deep learning workloads.</li></ol><h3>Implementing NUMA-Awareness in PyTorch</h3><p>To leverage NUMA-aware architectures in PyTorch, users need to manage memory allocation and process affinity to ensure that data remains local to the cores processing it. Here’s a high-level approach:</p><ol><li><strong>Set Process Affinity:</strong> Use tools like numactl or libraries that allow setting CPU affinity to bind PyTorch processes or threads to specific NUMA nodes. For example:</li></ol><pre>numactl - cpunodebind=0 - membind=0 python my_script.py</pre><p>This ensures that both compute and memory accesses occur within the same NUMA node, reducing latency.</p><p><strong>3. Use PyTorch’s Threading and Memory Management APIs:</strong> PyTorch provides threading controls, such as torch.set_num_threads(), allowing users to limit the number of threads PyTorch uses per core, which can help in optimizing memory access patterns in NUMA systems.</p><p><strong>4. Data Allocation:</strong> Allocate large tensors explicitly within the preferred NUMA node. This can be achieved with custom memory allocators or system-level tuning for applications with consistent data requirements.</p><h3>Performance Gains and Considerations</h3><p>NUMA-awareness can yield significant performance gains, particularly in workloads with high LLC dependency, such as matrix multiplications and convolutional operations common in deep learning. However, achieving optimal performance may require tuning, as the ideal NUMA configuration can vary based on model architecture, input data size, and hardware characteristics.</p><h3>Conclusion</h3><p>NUMA-aware architectures represent a powerful optimization strategy for improving locality and LLC accesses in CPU hyperthreading environments. By leveraging NUMA-aware techniques, deep learning practitioners using PyTorch can achieve better utilization of CPU resources, reduce latency, and increase throughput. As deep learning frameworks continue to evolve, the integration of NUMA-awareness could become a key factor in maximizing performance on multi-core, hyperthreaded CPUs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=323037664700" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Geoffrey Hinton: The Godfather of AI Whose Legacy Continues to Shape the Future]]></title>
            <link>https://theraddani.medium.com/geoffrey-hinton-the-godfather-of-ai-whose-legacy-continues-to-shape-the-future-2af7637df5f3?source=rss-2eb3f81cbd06------2</link>
            <guid isPermaLink="false">https://medium.com/p/2af7637df5f3</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Daniel Ferreto]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 01:42:19 GMT</pubDate>
            <atom:updated>2023-10-03T02:07:09.458Z</atom:updated>
            <content:encoded><![CDATA[<p>By Daniel Ferreto</p><p>Geoffrey Hinton, often referred to as the “Godfather of AI,” is a name synonymous with the incredible advancements we’ve witnessed in artificial intelligence (AI) over the past few decades. His pioneering work, visionary insights, and unwavering dedication have not only transformed the field but have also set a high bar for those who follow in his footsteps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*Np6ct1eVi3PsL2QyJDzvtg@2x.jpeg" /></figure><p><strong>A Journey of Innovation</strong></p><p>Hinton’s journey into the world of AI is a story of perseverance and innovation. Long before AI became a mainstream topic, he was already delving deep into neural networks and machine learning. His groundbreaking work on backpropagation algorithms laid the groundwork for what we now know as deep learning. It’s no exaggeration to say that Hinton’s early insights sparked the AI revolution we see today.</p><p><strong>The Power of Neural Networks</strong></p><p>One of Hinton’s most significant contributions to AI was his development of neural networks, specifically convolutional neural networks (CNNs). These have become the backbone of many AI applications, especially in computer vision. From image recognition to self-driving cars, CNNs have ushered in an era where machines can “see” and understand the world like never before.</p><p><strong>A Mentor and Collaborator</strong></p><p>Hinton’s impact goes beyond his own work. He’s been a mentor and collaborator to countless researchers, fostering a culture of learning and innovation. His influence can be seen in the success of many of his former students, who have gone on to become AI leaders themselves. Hinton’s emphasis on collaboration has strengthened the AI community and accelerated progress in the field.</p><p><strong>Ethical AI Advocacy</strong></p><p>Beyond his technical contributions, Hinton has been a vocal advocate for ethical AI. He understands the profound societal implications of AI technologies and has consistently called for their responsible development. His voice reminds us that the journey of AI isn’t just about technological advancement but also about ensuring that these advancements benefit humanity as a whole.</p><p><strong>The Legacy Continues</strong></p><p>As we reflect on Geoffrey Hinton’s legacy, we find ourselves in a world profoundly shaped by his work. From voice assistants to healthcare diagnostics, AI is now an integral part of our lives, thanks in no small part to his pioneering efforts.</p><p>But perhaps the most remarkable thing about Geoffrey Hinton is that his journey is far from over. He continues to contribute to AI research and remains a source of inspiration for AI enthusiasts, researchers, and engineers worldwide. His work has laid the foundation for countless innovations yet to come.</p><p>In conclusion, Geoffrey Hinton’s title as the “Godfather of AI” is not just a recognition of his past achievements; it’s a testament to his ongoing influence and the incredible potential of AI. As we look to the future, we can be sure that Hinton’s work will continue to shape the trajectory of AI, bringing us closer to the dream of intelligent machines and a better world for all.</p><p>Follow me on social media:</p><p>LinkedIn: https://www.linkedin.com/in/luis-daniel-ferreto-chavarria?utm_source=share&amp;utm_campaign=share_via&amp;utm_content=profile&amp;utm_medium=ios_app</p><p>GitHub: https://github.com/TheRadDani</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2af7637df5f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>