Skip to content

Commit

Permalink
existence proof that is_deriv isn't needed
Browse files Browse the repository at this point in the history
hctdb.py set is_deriv, but only actually used the equivalent is_gradient flag
  • Loading branch information
pow2clk committed Nov 26, 2024
1 parent e824ae3 commit 8f2680f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions utils/hct/hctdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def __init__(self, name, **kwargs):
self.is_allowed = True # whether this instruction is allowed in a DXIL program
self.oload_types = "" # overload types if applicable
self.fn_attr = "" # attribute shorthands: rn=does not access memory,ro=only reads from memory,
self.is_deriv = False # whether this is some kind of derivative
self.is_gradient = False # whether this requires a gradient calculation
self.is_feedback = False # whether this is a sampler feedback op
self.is_wave = False # whether this requires in-wave, cross-lane functionality
Expand Down Expand Up @@ -5523,11 +5522,6 @@ def UFI(name, **mappings):
","
):
self.name_idx[i].is_gradient = True
for i in "DerivCoarseX,DerivCoarseY,DerivFineX,DerivFineY".split(","):
assert (
self.name_idx[i].is_gradient == True
), "all derivatives are marked as requiring gradients"
self.name_idx[i].is_deriv = True

# TODO - some arguments are required to be immediate constants in DXIL, eg resource kinds; add this information
# consider - report instructions that are overloaded on a single type, then turn them into non-overloaded version of that type
Expand Down

0 comments on commit 8f2680f

Please sign in to comment.