Environment
BIGtensor (GPU) runs on a single machine.
The shell scripts and code packaging scripts work easily in Linux or Unix machines.
BIGtensor (GPU) needs the following software to be installed in the system:
src/Eigen
. Visit a homepage for more information.Download and Install
Installation is as simple as downloading and extracting the installation file.
tar xvzf BIGtensor-gpu.tar.gz
.Configuration
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/out/
make tf
and run the program with demo.sh
Detailed explanations about how to use this library are on USER Guide and API Doc below.
Code Examples
There are two ways to use the BIGtensor library: (1) writing a single executable (demo) or (2) using C/C++ API.
...
int rank = 10; // rank size
int gpu_mode = 0; // 0: cpu, 1: single-gpu, 2: multi-gpu
int cp_or_tucker = 1; // 0: Tucker, 1: CP
int fully_or_partially_observable = 1; // 0: fully observable, 1: partially observable
char* InputPath = "path/to/input/tensor";
char* ResultPath = "path/to/output/tensor";
Tensor Core;
Tensor A = Tensor(InputPath);
A.GPU_Mode_Change(gpu_mode);
A.Factorization_Mode_Change(cp_or_tucker);
A.Observation(fully_or_partially_observable);
Tensor::tensor_factorization(A, Core, rank, ResultPath);
...
Please see src/Test_Code
and demo.sh
for further examples.
#include "Tensor.h"
#include "BIGtensor.hpp"
int main(int argc, char* argv[]) {
BIGtensor bt;
int rank = 10; // rank size
int fully_or_partially_observable = 1; // 0: fully observable, 1: partially observable
char* in_tensor_path = "path/to/input/tensor";
char* out_factor_path = "path/to/output/tensor";
bt.Parafac(rank, fully_or_partially_observable, in_tensor_path, out_factor_path, ANY);
return 0
}
Please see src/Test_Code/test_bigtensor.cpp
for further examples.
The User Guide provides information on the general overview, installation, and supported functions of BIGtensor (GPU).
The API Doc provides detailed information on classes and functions in BIGtensor (GPU).