Ticket #67 (accepted enhancement)

Opened 12 years ago

Last modified 6 years ago

FR: handle non-inlinable intrinsics (deals with MIN/MAX/RESHAPE...)

Reported by: Utke Owned by: utke
Priority: 3 Milestone:
Component: Miscellaneous Keywords:


some intrinsics have no easy closed form expression for the partials such as MIN/MAX. We also want to support user defined non-inlinable intrinsics.

Change History

comment:1 Changed 11 years ago by Utke

Here is some previous e-mail conversation:

First, I don't believe we should allow just anything for the
partials. This would be too complex.
We want to cover

  • simple partials that evaluate in a single expression,
  • partials like the one for max that don't fit into an expression
  • partials for user defined intrinsics
  • partials for non-inlinable intrinsics (incl. user defined)

So the problem cases are the second and the fourth.
I would like a solution that covers both.
My current thinking for non-inlinable intrisics
foo(x,..,y,..) is that the non-inlinable intrinsics catalogues
specifies a foo_ad(x,...,y,..., partials,...)
I.e. the transformation replaces foo with foo_ad.
This maintains any potential efficiency advantage to be gained
by coupling the function and partials evaluation. (as opposed to
separating in function value and each partial)
In order for this to work we would need to provide a spot where
foo_ad is defined.
For the user defined things past discussions have gone towards
allowing a black box subroutine. 'foo_ad' would then just be the name
of the external routine to be found by the linker in some object file
that comes with the xaif file.
If we can do this then 'max' could be handled as a non-inlinable
intrinsic. So, in short, the handling of user defined non-inlinable intrinsics
with a black box partial providing subroutine requires quite a bit
of work on the xaifBooster side but it could avoid another special solution
for max, pow and the like.

There are of course other alternatives but now
I am in favor of this one. In 10 minutes it may change though.
Please let me know what you think


I guess that we need to make the definition of intrinsics more general allowing for pretty much everythiong that is in xaif to be used. We could then write sth. like

if (b<a) then





comment:2 Changed 8 years ago by utke

  • Status changed from Assigned to new

comment:3 Changed 8 years ago by utke

  • Status changed from new to closed
  • Resolution set to fixed

done in the preprocessor now

comment:4 Changed 7 years ago by utke

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:5 Changed 7 years ago by utke

  • Owner changed from Utke to utke
  • Status changed from reopened to accepted

comment:6 Changed 7 years ago by utke

additional changes done with:
============================ RegressionOpenAD
============================ SourceProcessing?
============================ xaifBooster
============================ xaif

comment:7 Changed 7 years ago by utke

need to fix adm for transpose

comment:8 Changed 6 years ago by utke

  • Summary changed from FR: handle non-inlinable intrinsics (deals with MIN/MAX) to FR: handle non-inlinable intrinsics (deals with MIN/MAX/RESHAPE...)

comment:9 Changed 6 years ago by utke

  • Type changed from defect to enhancement
Note: See TracTickets for help on using tickets.