From b9f762ee85addc2cd657f3a897f8a6fd81e73af4 Mon Sep 17 00:00:00 2001 From: ZuseZ4 Date: Fri, 6 Dec 2024 03:12:00 +0000 Subject: [PATCH] deploy: e1b5bad2696b24d2c3a34790c899b15a2d0a5873 --- getting_started/UsingEnzyme/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/getting_started/UsingEnzyme/index.html b/getting_started/UsingEnzyme/index.html index 00a6a7c..b6a81dc 100644 --- a/getting_started/UsingEnzyme/index.html +++ b/getting_started/UsingEnzyme/index.html @@ -100,8 +100,6 @@

Semantic options 

Loose type analysis 

The enzyme-loose-types option tells Enzyme to make an educated guess about the type of a value it cannot prove, rather than emit a compile-time error and fail. This can be helpful for starting to bootstrap code with Enzyme but shouldn’t be used in production as Enzyme may make an incorrect guess and create an incorrect gradient.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-loose-types=1
 

Assume inactivity of undefined functions 

The enzyme-emptyfn-inactive option tells activity analysis to assume that all calls to functions whose definitions aren’t available and aren’t explicitly given a custom gradient via metadata are assumed to be inactive. This can be useful for assuming printing functions don’t impact derivative computations and provide a performance benefit, as well as getting around a compile-time error where the derivative of a foreign function is not known. However, this option should be used carefully as it may result in incorrect behavior if it is used to incorrectly assume a call to a foreign function doesn’t impact the derivative computation. As a result, the recommended way to remedy this is to mark the function as inactive explicitly, or provide a custom gradient via metadata.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-emptyfn-inactive=1
 

Assume inactivity of unmarked globals 

The enzyme-globals-default-inactive option tells activity analysis to assume that global variables without an explicitly defined shadow global are assumed to be inactive. Like enzyme_emptyfnconst, this option should be used carefully as it may result in incorrect behavior if it is used to incorrectly assume that a global variable doesn’t contain data used in a derivative computation.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-globals-default-inactive=1
-

Cache behavior 

The enzyme-cache-never option tells the cache to recompute all load values, even if alias analysis isn’t able to prove the legality of such a recomputation. This may improve performance but is likely to result in incorrect derivatives being produced as this is not generally true.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-cache-never=1
-

In contrast, the enzyme-cache-always option tells the cache to still cache values that alias analysis and differential use analysis say are not needed to be cached (perhaps being legal to recompute instead). This will usually decrease performance and is intended for developers in order to catch caching bugs.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-cache-always=1
 

Debugging options for developers 

enzyme-print 

This option prints out functions being differentiated before preprocessing optimizations, after preprocessing optimizations, and after being synthesized by Enzyme. It is mostly use to debug the AD process.

$ opt input.ll -load-pass-plugin=./Enzyme/LLVMEnzyme-17.so.so -passes=enzyme -enzyme-print
 prefn: