llvm/llvm/lib/Analysis/TrainingLogger.cpp

//===- TrainingLogger.cpp - mlgo feature/reward logging -------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements logging infrastructure for extracting features and
// rewards for mlgo policy training.
//
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/TensorSpec.h"
#include "llvm/Config/config.h"

#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/Utils/TrainingLogger.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"

#include <cassert>
#include <numeric>

usingnamespacellvm;

void Logger::writeHeader(std::optional<TensorSpec> AdviceSpec) {}

void Logger::switchContext(StringRef Name) {}

void Logger::startObservation() {}

void Logger::endObservation() {}

void Logger::logRewardImpl(const char *RawData) {}

Logger::Logger(std::unique_ptr<raw_ostream> OS,
               const std::vector<TensorSpec> &FeatureSpecs,
               const TensorSpec &RewardSpec, bool IncludeReward,
               std::optional<TensorSpec> AdviceSpec)
    :{}