# folding

Published articles for folding.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## MLIR -- Folders and Constant Propagation

DevFeed: [MLIR -- Folders and Constant Propagation](<https://devfeed.tech/articles/mlir-folders-and-constant-propagation-40474.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/09/11/mlir-folders/>)

Published: 2023-09-11T08:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Computing](<https://devfeed.tech/topics/computing.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [canonicalization](<https://devfeed.tech/tags/canonicalization.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [folding](<https://devfeed.tech/tags/folding.md>), [heir](<https://devfeed.tech/tags/heir.md>), [invariant](<https://devfeed.tech/tags/invariant.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [process](<https://devfeed.tech/tags/process.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This tutorial explains how MLIR folding supports sparse conditional constant propagation and canonicalization. It describes adding a constant operation, a materialization hook, and folders for each operation, while distinguishing local canonicalization from propagation through control flow.

### Source excerpt

Table of Contents Last time we saw how to use pre-defined MLIR traits to enable upstream MLIR passes like loop-invariant-code-motion to apply to poly programs. We left out -sccp (sparse conditional constant propagation), and so this time we'll add what is needed to make that pass work. It requires the concept of folding. The code for this article is in this pull request, and as usual the commits are organized to be read in order.

## Carnival of Mathematics #197

DevFeed: [Carnival of Mathematics #197](<https://devfeed.tech/articles/carnival-of-mathematics-197-40448.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2021/09/01/carnival-of-mathematics-197/>)

Published: 2021-09-01T08:00:00Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Graphics](<https://devfeed.tech/topics/graphics.md>), [Simulation](<https://devfeed.tech/topics/simulation.md>), [Data Science](<https://devfeed.tech/topics/data-science.md>)

Tags: [carnival](<https://devfeed.tech/tags/carnival.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [fibonacci](<https://devfeed.tech/tags/fibonacci.md>), [folding](<https://devfeed.tech/tags/folding.md>), [functional-analysis](<https://devfeed.tech/tags/functional-analysis.md>), [geometric-series](<https://devfeed.tech/tags/geometric-series.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [inner-product](<https://devfeed.tech/tags/inner-product.md>), [knot-theory](<https://devfeed.tech/tags/knot-theory.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [oeis](<https://devfeed.tech/tags/oeis.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [sieve](<https://devfeed.tech/tags/sieve.md>), [simulation](<https://devfeed.tech/tags/simulation.md>), [umap](<https://devfeed.tech/tags/umap.md>), [visualization](<https://devfeed.tech/tags/visualization.md>)

### AI overview

The 197th Carnival of Mathematics introduces the number 197 and highlights mathematical and technical topics including curve untangling, folding equilateral triangles without measurement, and criticism of UMAP and t-SNE dimensionality reduction.

### Source excerpt

Welcome to the 197th Carnival of Mathematics! 197 is an unseemly number, as you can tell by the Wikipedia page which currently says that it has "indiscriminate, excessive, or irrelevant examples." How deviant. It's also a Repfigit, which means if you start a fibonacci-type sequence with the digits 1, 9, 7, and then continue with $ a_n = a_{i-3} + a_{i-2} + a_{i-1}$, then 197 shows up in the sequence. Indeed: 1, 9, 7, 17, 33, 57, 107, 197, ...