Earlier quoted context omitted.
It's certainly not the case that autodiff is only possible at the compiler level. I've implemented forward mode (via dual numbers) and reverse mode (via tapes / wengert nodes) autodiff in libraries before.
notice the qualifier "really". obviously you can implement autodiff kind of outside the complier since pytorch and tensor flow exist. but those implementations constrain you to a select few compositions (please no comments on Turing completeness with just loops and conditionals). so for example if statements in pytorch are not differentiable (they might have piece wise continuous derivates) because pytorch doesn't ac…
Take
if x == 59:
return 1000
else if x > 59:
return -x
else:
return x
How do you optimize this to maximize x, regardless of what language you're in?It's true that you can get a derivative, but the derivative is essentially meaningless.