This post explains how to measure GPU utilisation in real-time using tools provided by NVIDIA.
Author archives: mskorski
Compiling Torch Code – Example on Memory Reduction
Staring from the version 2.x PyTorch, a popular deep-learning framework, introduces a JIT compiler torch.compile. In this post, I am sharing a non-trivial example demonstrating how this tool can reduce memory footprint on GPU. The point of departure is a sub-routine which computes similarity, similar to covariance but not as friendly to compute. For two …
Continue reading “Compiling Torch Code – Example on Memory Reduction”
Dealing with geo coordinates
Location on maps are often provided in a Coordinate Reference System (CRS). In computer vision projects, however, we need to translate them to pixels. Plotting and transformations can be accomplished with the rasterio Python module. Below I share a useful snippet showing how to convert CRS locations to pixel coordinates:
Setting up CUDA tools properly
Diagnosing CUDA setups – two use-cases from real development.
Lego Bricks in LaTeX
Who does not enjoy lego bricks, raise a hand! In this post, I am sharing an elegant and efficient way of plotting bricks under 3d view in TikZ. Briefly speaking, it utilizes canvas transforms to plot facets, and describes boundaries of studs in a simple way with cylindrical coordinates based on the azimuth angle (localizing …
Cylinders in LaTeX the Easy and Correct Way
Drawing cylinders in vector graphic is a common task. It is less trivial as it looks at first glance, due to the challenge of finding a proper projection. In this post, I share a simple and robust recipe using the tikz-3dplot package of LaTeX. As opposed to many examples shared online, this approach automatically identifies …
Continue reading “Cylinders in LaTeX the Easy and Correct Way”
Automating Accessors and Mutators Tests
In object-oriented programming, there are plenty of accessors and mutators to test. This post demonstrates that this effort can be automated with reflection 🚀. The inspiration came from discussions I had with my students during our software-engineering class: how to increase code coverage without lots of manual effort? 🤔 Roughly speaking, the reflection mechanism allows …
Tracking Training Performance of LDA Models
In my recent open source contribution I enabled callbacks in the scalable (multi-core) implementation of Latent Dirichlet Alocation in the gensim library 1. This will, in turn, allow users for faster and more accurate turning of the popular topic extraction model. An obvious use case is monitoring and early stopping of training, with popular coherence …
Continue reading “Tracking Training Performance of LDA Models”
On UML Approach to Management Antipatterns
Ever wondered how miserable some “prestigious” businesses are, and how they manage to make their employees make up for poor project management? Me too! Let’s explore how UML can be used to study such antipatterns.
Working with Abstract Syntax Trees
Visualizing code as a syntax tree is both funny and useful, as seen from impressive applications such as creating lineage of SQL which helps to understand complex queries in business. Abstract syntax trees are not only widely used in industry but are still a subject of top academic research1,2. This post demonstrates how to work …