BIGtensor-GPU
1.0
|
Ver 1.0 (Last Updated: 2021/06/14)
BIGtensor-gpu provides a fast and accurate tensor mining tool.
BIGtensor-gpu
We provide various tensor operations as follows:
BIGtensor-gpu requires several libraries:
./bin/device-info
command.src/Eigen
. Visit http://eigen.tuxfamily.org/ for more information.export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/out/
.make
../demo.sh
and check the results.There are two ways to use the BIGtensor library: (1) writing a single executable (demo) or (2) using C/C++ API.
make tf
after installing all requirements and configuring the library path.src/Test_Code/test_tf.cpp
, is in bin
directory after compilation../bin/demo_tf resource/sample_tensor_large.txt result 10 512 1 1 0
to execute the binary../bin/demo_tf [TENSOR PATH] [RESULT PATH] [RANK] [LOCAL SIZE] [NUMBER OF GPUS TO BE USED] [FULLY or PARTIALLY OBSERVABLE] [CP or TUCKER]
resource
directory.FACTOR0, FACTOR1, FACTOR2, CORETENSOR
in result
directory.Please see src/Test_Code
and demo.sh
for further examples. Note that results of demo.sh
are written in result
directory and tensor-tensor operations do not output operation results. The table below describes the results of demo.sh
execution.
Type | Function | Results |
---|---|---|
Tensor Factorization | Decompose tensors (CP, Tucker) with non-negative constraints or coupled matrix | FACTOR* and CORETENSOR represent factor matrices and a core tensor, respectively. For example, CP decomposition of the 3rd mode tensor returns three factor matrices of shape (tensor_shape[i], rank) and a 1-d array of shape (rank). Note that 1) results from nonnegative tensor factorization contain nonnegative values, and 2) CMTF returns extra results, a factor matrix CFACTOR and a weight vector CORETENSOR2 of an input coupled matrix . |
Tensor Generation | Generate tensors satisfying certain conditions (filled with random values) | Generated tensors are written in a sparse format (COO type). For example, the 3rd mode tensor filled with random values (random.txt ) is written with rows (i, j, k, nnz) where i,j,k are tensor indices and nnz are random values. |
Tensor Manipulation | Compute essential tensor operations | Operated tensors are written in a sparse format (COO type). For example, the matricization of the 3rd mode tensor (matricization.txt ) is written with rows (i, j, nnz) where i, j are matrix indices and nnz are values. |
To use the API, include Tensor.h
and BIGtensor.h
in your script.
The following is a code example using the API.
Please see src/Test_Code/test_bigtensor.cpp
for further examples.