SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Classes | Namespaces | Typedefs | Functions | Variables
smaug_test.h File Reference

SMAUG unit test fixture. More...

#include <fstream>
#include "catch.hpp"
#include "smaug/core/network.h"
#include "smaug/core/backend.h"
#include "smaug/core/tensor.h"
#include "smaug/core/workspace.h"

Go to the source code of this file.

Classes

class  smaug::SmaugTest
 The Catch2 test fixture used by all C++ unit tests. More...
 

Namespaces

 smaug
 The smaug namespace is the parent namespace of all C++ code in SMAUG.
 

Typedefs

typedef void(* smaug::FillTensorDataFunc) (Tensor *tensor)
 Any function that accepts a Tensor, fills it with data, and returns nothing.
 

Functions

float16 smaug::fp16 (float fp32_data)
 This converts a float32 into a float16.
 
float smaug::fp32 (float16 fp16_data)
 This converts a float16 into a float32.
 
Tensor * smaug::convertFp16ToFp32Tensor (Tensor *fp16Tensor, Workspace *workspace)
 This creates a tensor with float32 data type and fills it with data converted from a source tensor with float16 data.
 
Tensor * smaug::convertFp32ToFp16Tensor (Tensor *fp32Tensor, Workspace *workspace)
 This creates a tensor with float16 data type and fills it with data converted from a source tensor with float32 data.
 

Variables

constexpr float smaug::kMargin = 0.001
 Sets the absolute value by which a result can differ from Approx's expected value.
 
constexpr float smaug::kEpsilon = 0.01
 Set the percentage by which a result can differ from Approx's expected value.
 

Detailed Description

SMAUG unit test fixture.

Definition in file smaug_test.h.