Skip to content

[HLSL] Propose and discuss a holistic approach to math operations in HLSL #87367

Closed
@bogner

Description

@bogner

From @farzonl's investigation of #83882 it's become clear that splitting up HLSL math operations between generic LLVM intrinsics and special cased HLSL intrinsics is pretty unfortunate. We would prefer to avoid having to implement a large chunk of generic math operations in our own playground, and instead handle them generically in LLVM.

To do this, we should propose implementing the set of math intrinsics we're interested in as generic LLVM intrinsics, and work with the community to get to a solution that makes sense across the board.

A couple of things to note:

  1. A chunk of the community has been reticent to accept new math intrinsics in the past (see https://discourse.llvm.org/t/math-intrinsics/67192, [HLSL] Implementation of tan intrinsic  #79948, etc), but there have been discussions debating the split between libcalls and intrinsics for math for a very long time (https://discourse.llvm.org/t/rfc-canonicalize-libcalls-to-intrinsics/39697)
  2. The proposal should discuss the full set of math operations we're interested in so that people understand the full picture when discussing this.

AC: This work item tracks sending the initial RFC and driving the conversation to an actionable conclusion.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions