GradResult
On this page

GradResult

Interface in IR

What grad returns: the module with the derivative function added, and its name.

import type { GradResult } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

interface GradResult {
readonly module: ModuleDecl;
readonly name: string;
}

Instance properties

moduleread only ModuleDecl

The input module plus the derivative function and the jvp helpers it calls.

nameread only string

The name of the derivative function in GradResult.module.

See also

Source

src/core/passes/grad.ts, line 51, at commit 26de7be8

Edit this page Report a problem