From b808aa4df50d46eaa569561f7e464c55c1c2d72a Mon Sep 17 00:00:00 2001 From: venkataram-nv Date: Wed, 18 Sep 2024 20:42:07 -0700 Subject: Report AD checkpoint contexts (#5058) * Transferring source locations when creating phi instructions * Tracking for simple variables * Deriving source locations for loop counters * Printing checkpoint structure breakdown * More readable output format * Special behavior for loop counters * Writing report to file * Add slangc option to enable checkpoint reports * Display types of checkpointed fields * Message in case there are no checkpointing contexts * Catch source locations for function calls * Source cleanup * Fix compilation warnings * Remove stray dump() * Provide the report through diagnostic notes * Add missing path for sourceLoc during unzip pass * Add tests for reporting intermediates * Include more transfer cases for source locations * Fix ordering in address elimination * Fill in more holes with source location transfer * Remove debugging line * Reverting changes to diagnostic sink * Simplify address elimination using source location RAII contexts * Eliminating manual source loc transfers in forward transcription * Fix local var adaptation to use RAII location setter * Simplify primal hoisting logic for source location transfer * Simplify unzipping with RAII location scopes * Simplify transpose logic * Cleaning up for rev.cpp * Reverting spacing changes * Fix mistake with source loc RAII instantiation * Fix formatting issues --- source/slang/slang-options.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index c02a00957..b9a12f971 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -339,6 +339,7 @@ void initCommandOptions(CommandOptions& options) { OptionKind::InputFilesRemain, "--", nullptr, "Treat the rest of the command line as input files."}, { OptionKind::ReportDownstreamTime, "-report-downstream-time", nullptr, "Reports the time spent in the downstream compiler." }, { OptionKind::ReportPerfBenchmark, "-report-perf-benchmark", nullptr, "Reports compiler performance benchmark results." }, + { OptionKind::ReportCheckpointIntermediates, "-report-checkpoint-intermediates", nullptr, "Reports information about checkpoint contexts used for reverse-mode automatic differentiation." }, { OptionKind::SkipSPIRVValidation, "-skip-spirv-validation", nullptr, "Skips spirv validation." }, { OptionKind::SourceEmbedStyle, "-source-embed-style", "-source-embed-style ", "If source embedding is enabled, defines the style used. When enabled (with any style other than `none`), " @@ -1703,6 +1704,7 @@ SlangResult OptionsParser::_parse( case OptionKind::DumpReproOnError: case OptionKind::ReportDownstreamTime: case OptionKind::ReportPerfBenchmark: + case OptionKind::ReportCheckpointIntermediates: case OptionKind::SkipSPIRVValidation: case OptionKind::DisableSpecialization: case OptionKind::DisableDynamicDispatch: -- cgit v1.2.3