Ticket #67 (accepted enhancement)

Opened 8 years ago

Last modified 2 years ago

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

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

Description

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

Changed 7 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

Jean

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
c=b
else
c=0
endif

Changed 4 years ago by utke

  • status changed from Assigned to new

Changed 4 years ago by utke

  • status changed from new to closed
  • resolution set to fixed

done in the preprocessor now

Changed 3 years ago by utke

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 3 years ago by utke

  • owner changed from Utke to utke
  • status changed from reopened to accepted

Changed 3 years ago by utke

additional changes done with:
============================ RegressionOpenAD
426:6850843ab165
============================ SourceProcessing?
841:4386d17f2741
============================ xaifBooster
1325:dd29291dd1ba
1326:39dbe8f2abd3
1327:5ed9aa97460c
1328:b7e79ccd9c16
1329:be8f6cf54df0
1330:63acb5764348
1331:f17739e9a507
1332:1ea5b2d3605d
1333:1214b83635a8
1334:a1f042546eb9
1335:7e85c0c8248e
============================ xaif
227:a6323a29c153
228:cce2bd9a8689
229:c804036426a1

Changed 3 years ago by utke

need to fix adm for transpose

Changed 2 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...)

Changed 2 years ago by utke

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