<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/Math/IR/MathOps.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR] Add sincos op to math dialect (#160772)</title>
<updated>2025-09-30T14:36:13+00:00</updated>
<author>
<name>Asher Mancinelli</name>
<email>ashermancinelli@gmail.com</email>
</author>
<published>2025-09-30T14:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=82efd72ed505c6ec183eca700290a29051c2d6e6'/>
<id>82efd72ed505c6ec183eca700290a29051c2d6e6</id>
<content type='text'>
Now that `sincos` is a supported intrinsic in the LLVM dialect
(#160561) we are able to add the corresponding operation in 
the math dialect and add conversion patterns for LLVM and NVVM.

We have several benchmarks that use sine and cosine in hot-loops, and
saving some calculations by performing them together can benefit
performance. We would like to have a way to represent sincos in the math
dialect.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that `sincos` is a supported intrinsic in the LLVM dialect
(#160561) we are able to add the corresponding operation in 
the math dialect and add conversion patterns for LLVM and NVVM.

We have several benchmarks that use sine and cosine in hot-loops, and
saving some calculations by performing them together can benefit
performance. We would like to have a way to represent sincos in the math
dialect.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] update `mlir/Dialect` create APIs (19/n) (#149926)</title>
<updated>2025-07-22T14:13:44+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-22T14:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b0312be6aa664e4cb9abec6d080e971493093d05'/>
<id>b0312be6aa664e4cb9abec6d080e971493093d05</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Math] Add floating point value folders (#127947)</title>
<updated>2025-02-20T15:59:55+00:00</updated>
<author>
<name>William Moses</name>
<email>gh@wsmoses.com</email>
</author>
<published>2025-02-20T15:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b610e69d9621e00714b126e646bebb912b1e9a1'/>
<id>1b610e69d9621e00714b126e646bebb912b1e9a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Math] Add erfc to math dialect (#126439)</title>
<updated>2025-02-18T15:51:37+00:00</updated>
<author>
<name>Jan Leyonberg</name>
<email>jan_sjodin@yahoo.com</email>
</author>
<published>2025-02-18T15:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8806311bb7c2b5a4a40698f544f775d62538d7df'/>
<id>8806311bb7c2b5a4a40698f544f775d62538d7df</id>
<content type='text'>
This patch adds the erfc op to the math dialect. It also does lowering
of the math.erfc op to libm calls. There is also a f32 polynomial
approximation for the function based on

https://stackoverflow.com/questions/35966695/vectorizable-implementation-of-complementary-error-function-erfcf
This is in turn based on
M. M. Shepherd and J. G. Laframboise, "Chebyshev Approximation of
(1+2x)exp(x^2)erfc x in 0 &lt;= x &lt; INF", Mathematics of Computation, Vol.
36, No. 153, January 1981, pp. 249-253.
The code has a ULP error less than 3, which was tested, and MLIR test
values were verified against the C implementation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the erfc op to the math dialect. It also does lowering
of the math.erfc op to libm calls. There is also a f32 polynomial
approximation for the function based on

https://stackoverflow.com/questions/35966695/vectorizable-implementation-of-complementary-error-function-erfcf
This is in turn based on
M. M. Shepherd and J. G. Laframboise, "Chebyshev Approximation of
(1+2x)exp(x^2)erfc x in 0 &lt;= x &lt; INF", Mathematics of Computation, Vol.
36, No. 153, January 1981, pp. 249-253.
The code has a ULP error less than 3, which was tested, and MLIR test
values were verified against the C implementation.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] add some FP classification ops and their lowering to libdevice (#127322)</title>
<updated>2025-02-16T13:51:21+00:00</updated>
<author>
<name>Oleksandr "Alex" Zinenko</name>
<email>git@ozinenko.com</email>
</author>
<published>2025-02-16T13:51:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=79d8a34bc5c0a261b9e9f77c1d4480ef135481ac'/>
<id>79d8a34bc5c0a261b9e9f77c1d4480ef135481ac</id>
<content type='text'>
Introduce a subset of floating point classification ops to the Math
dialect. These ops mirror functions provided by the C math library and,
similarly to the existing `math.copysign`, belong to the math dialect.
Add a lowering of those ops to Nvidia libdevice calls when possible as
the first mechanism to exercise them.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a subset of floating point classification ops to the Math
dialect. These ops mirror functions provided by the C math library and,
similarly to the existing `math.copysign`, belong to the math dialect.
Add a lowering of those ops to Nvidia libdevice calls when possible as
the first mechanism to exercise them.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][math] Add math.acosh|asin|asinh|atanh op (#77463)</title>
<updated>2024-01-10T12:39:32+00:00</updated>
<author>
<name>Vivek Khandelwal</name>
<email>vivekkhandelwal1424@gmail.com</email>
</author>
<published>2024-01-10T12:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b8dca4fa729fcbd5d42ce3ca056dc4d278da2548'/>
<id>b8dca4fa729fcbd5d42ce3ca056dc4d278da2548</id>
<content type='text'>
Signed-Off By: Vivek Khandelwal &lt;vivekkhandelwal1424@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-Off By: Vivek Khandelwal &lt;vivekkhandelwal1424@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][math] Added `math.sinh` with expansions to `math.exp` (#75517)</title>
<updated>2023-12-15T19:35:40+00:00</updated>
<author>
<name>Rob Suderman</name>
<email>rob.suderman@gmail.com</email>
</author>
<published>2023-12-15T19:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa165edca8545b212de084d5b18c3d30347f774a'/>
<id>aa165edca8545b212de084d5b18c3d30347f774a</id>
<content type='text'>
Includes end-to-end tests for the cpu running, folders using `libm` and
lowerings to the corresponding `libm` operations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Includes end-to-end tests for the cpu running, folders using `libm` and
lowerings to the corresponding `libm` operations.</pre>
</div>
</content>
</entry>
<entry>
<title>Add cosh op to the math dialect. (#75153)</title>
<updated>2023-12-13T11:25:37+00:00</updated>
<author>
<name>Sungsoon Cho</name>
<email>1025787+godot73@users.noreply.github.com</email>
</author>
<published>2023-12-13T11:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=762964e97fd66ab7728ecc92aa153a61266fa9df'/>
<id>762964e97fd66ab7728ecc92aa153a61266fa9df</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement acos operator in MLIR Math Dialect (#74584)</title>
<updated>2023-12-08T17:08:43+00:00</updated>
<author>
<name>Frederik Harwath</name>
<email>frederik@harwath.name</email>
</author>
<published>2023-12-08T17:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7250179e22ce4aab96166493b27223fa28c2181'/>
<id>f7250179e22ce4aab96166493b27223fa28c2181</id>
<content type='text'>
Required for torch-mlir.
Cf. llvm/torch-mlir#2604 "Implement torch.aten.acos".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Required for torch-mlir.
Cf. llvm/torch-mlir#2604 "Implement torch.aten.acos".</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][ub] Add poison support to CommonFolders.h</title>
<updated>2023-09-07T10:30:29+00:00</updated>
<author>
<name>Ivan Butygin</name>
<email>ivan.butygin@gmail.com</email>
</author>
<published>2023-08-28T18:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5dce74817b71a1f646fb2857c037b3a66f41c7cd'/>
<id>5dce74817b71a1f646fb2857c037b3a66f41c7cd</id>
<content type='text'>
Return poison from foldBinary/unary if argument(s) is poison. Add ub dialect as dependency to affected dialects (arith, math, spirv, shape).
Add poison materialization to dialects. Add tests for some ops from each dialect.
Not all affected ops are covered as it will involve a huge copypaste.

Differential Revision: https://reviews.llvm.org/D159013
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return poison from foldBinary/unary if argument(s) is poison. Add ub dialect as dependency to affected dialects (arith, math, spirv, shape).
Add poison materialization to dialects. Add tests for some ops from each dialect.
Not all affected ops are covered as it will involve a huge copypaste.

Differential Revision: https://reviews.llvm.org/D159013
</pre>
</div>
</content>
</entry>
</feed>
