Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[WIP] Sparse Tensor #5800

Merged
merged 29 commits into from
Jun 26, 2017
Merged

[WIP] Sparse Tensor #5800

merged 29 commits into from
Jun 26, 2017

Commits on Jun 10, 2017

  1. squash

    merge with 38f7c55
    
    compiles on GPU
    
    update check alloc:
    
    Checkpoint. Pass elem-sum gpu test
    
    bug fix for copyfromto. sparse sgd test pass on gpu
    
    inefficient implementation for csr copy
    
    update submodule
    
    fix lint
    
    Simple bind with infer storage type (#32)
    
    * Symbol binding for sparse tensor development. (#31)
    
    * Initial checkin
    
    * Add init functions for simple bind in graph_executor
    
    * Add simple_bind c_api
    
    * Add simple bind c-api
    
    * Assign zeros to in_args, arg_grads, and aux_states
    
    * Add simple_bind2 python interface
    
    * Fix python interface bugs
    
    * Interface changes
    
    * Fix
    
    * Fix core dump
    
    * Add bind_ith_exec c_api
    
    * Change simple_bind2
    
    * Fix seg fault
    
    * Finish simple_bind
    
    * Change _bind_ith_exec
    
    * Refactor simple_bind initialization flow for bind
    
    * Consolidate bind and simple_bind graph init flow
    
    * Fix bug
    
    * Clean up
    
    * Add comments
    
    * Clean up
    
    * Clean up
    
    * Minor correction
    
    * Rename APIs in graph executor
    
    * Refactor
    
    * Rebase
    
    * Delete deprecated functions
    
    * Move more front-end work to backend
    
    * Bug fix
    
    * Fix failed tests
    
    * Minor fix
    
    * Fix lint
    
    * Fix lint
    
    * Revert unnecessary changes
    
    * Revert
    
    * Revert
    
    * Clean up
    
    * Fix lint
    
    Conflicts:
    	python/mxnet/symbol.py
    	src/executor/graph_executor.cc
    
    * Add inferstorage to graph executor
    
    * re-enable tests for sparse embedding with simple_bind
    
    * type switch fix in sparse embedding"
    ;
    
    change `default` to `default_storage` for cast storage op (#33)
    
    * change default to default_storage
    
    * disable cpp test build temporarily
    
    attempt to fix windows build error, and fix lint (#34)
    
    update nnvm submodule (#37)
    
    Scipy build (#38)
    
    * update nnvm submodule
    
    * add scipy pip install for dockerfile
    
    Python3 unit tests (#39)
    
    * change xrange to range for python3 compatiblity"
    
    * remove more xrange from tests
    
    replace long with int for python3 (#40)
    
    fix the rest of TShape constructor errors (#41)
    
    fix lint (#42)
    
    fix wrong usage of mshadow::Shape1" (#43)
    
    implementation for Csr slice on cpu (#36)
    
    * CPU implementation for CSR
    
    remove seg_len from csr slice
    
    add some docs for slice csr
    
    change indptr, values, etc to be private member
    
    bug fix in sparse embedding
    
    update nnvm submoduel
    
    fix lint
    
    update unit test for sparse nd"
    
    * add const for SliceCsrIndPtr kernel
    
    Fix sparse dot according to the new RSP definition (#35)
    
    * Fix csr dot dns
    
    * Fix sparse dot
    
    * Add fallback and test cases for dot(csr, dns)=dns
    
    * Add int type switch
    
    * Fix
    
    * Fix
    
    * Fix
    
    update mshadow submodule (#44)
    
    Fix dns to rsp (#46)
    
    fix lint (#47)
    
    add runtime storage fallback detection" (#48)
    
    * add runtime storage fallback detection"
    
    * replace cast storage ex with cast storage impl
    
    Fm example (#45)
    
    * update csr slice logic to avoid confusion. add more exmaples.
    
    * add hint to module.update
    
    * more testcases(fallback) for sparse_nd
    
    * add to_csr() and to_rsp() method. More unit test (fallback now)
    
    * add fm test. fix lint
    
    * register sparse sgd under Optim.SGD
    
    * update dmlc-core submoduel
    
    * change indptr to _indptr temporarily. add const ref to fname
    
    fix lint
    
    fix lint; (#51)
    
    Guard gpu cast storage (#50)
    
    * Clean up
    
    * Fix typo
    
    Rearrange unit test files (#52)
    
    fix lint. add scipy for python_test. fix scipy.sparse import error. fix truediv for python3
    
    fix travis test (#54)
    
    * remove pyc files
    
    * add verbose for travis nosetests
    
    cleanup some testing code and enums (#57)
    
    * update Makefile
    
    * refactor test_sparse_operator
    
    * change `default_storage` back to `default`
    
    * remove unused cpp tests
    
    port libsvm parser to mxnet as libsvm iter (#55)
    
    * copied csv iter to libsvm iter
    
    test
    
    libsvm iter draft
    
    handle round batch == false for csr batch loader
    
    code refactoring
    
    add get stype, shape interface to iiter
    
    separate class for sparse iter
    
    add missing file
    
    fix mem corruption'
    
    rename variables
    
    add comments
    
    also read label from libsvm
    
    add test. update docs. update submodule
    
    Conflicts:
    	python/mxnet/sparse_ndarray.py
    
    * update submodule
    
    * fix lint
    
    * update test
    
    * revert naming change
    
    add benchmark scritp for dot (#59)
    
    * add benchmark scritp for dot
    
    add gpu option for bench
    
    add get_data funciton for benchmark
    
    print t_sparse, too;
    
    add comment
    
    change nnz to dnesity
    
    add backward
    
    * add comment
    
    update fm test (#62)
    
    introduce CSRNDarray and rowsparseNDarray to python frontend api (#58)
    
    * introduce CSRNDarray and rowsparseNDarray to python frontend api
    
    * temporarily disable fm_module test
    
    fix lint (#64)
    
    fix typo. disable libsvm io test (#65)
    
    Improve dot (#61)
    
    * Init checkin
    
    * Fix
    
    * Adjust dot parallelization methods
    
    * Set num_omp_threads for benchmark from command line
    
    * Fix omp thread number
    
    * Clean up
    
    * Add scipy as dot baseline
    
    * Fix format
    
    sparse_retain op (#66)
    
    * Initial checkin
    
    * Fix bugs
    
    * Add unit test for sparse_retain
    
    * Add example and modify test
    
    add storage cast for outputs that have non-default storage (#67)
    
    fix gpu build (#69)
    
    Fix test_sparse_retain python3 issue (#68)
    
    revert nnvm version
    eric-haibin-lin committed Jun 10, 2017
    Configuration menu
    Copy the full SHA
    f98912b View commit details
    Browse the repository at this point in the history
  2. draft for sgd rsp rsp (#75)

    support sgd(rsp, rsp)
    
    support dot(csr, rsp) when rsp is full
    
    add ref to const ndarray params
    
    support sparse embedding with rsp weight'
    
    fix lint
    
    modify embedding backward to produce dense grad
    
    remove invalid_rid for rsp->dns
    
    remove previous embedding op changes
    
    pass sparse embedding test
    
    add STORAGE_TYPE_ASSIGN_CHECK
    
    remove backward storage infer
    eric-haibin-lin committed Jun 10, 2017
    Configuration menu
    Copy the full SHA
    a880bc7 View commit details
    Browse the repository at this point in the history
  3. fix lint (#78)

    eric-haibin-lin authored Jun 10, 2017
    Configuration menu
    Copy the full SHA
    6d329cd View commit details
    Browse the repository at this point in the history
  4. fix lint (#79)

    eric-haibin-lin authored Jun 10, 2017
    Configuration menu
    Copy the full SHA
    c8d3742 View commit details
    Browse the repository at this point in the history
  5. serial elemwise sum impl (#80)

    update module kvstore interface
    
    add other missing params and functions
    
    revert some interface changes
    
    revert some more changes
    
    reomve explicit casting for gradients on kvstore
    
    update Comm interface
    
    update fm example
    
    Conflicts:
    	python/mxnet/model.py
    	python/mxnet/ndarray.py
    eric-haibin-lin authored Jun 10, 2017
    Configuration menu
    Copy the full SHA
    16a6d7f View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2017

  1. bug fix for initializing module with row_sparse weight (#81)

    * bug fix for initializing module with row_sparse weight
    
    * update log message
    eric-haibin-lin authored Jun 11, 2017
    Configuration menu
    Copy the full SHA
    87bb1f7 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2017

  1. Sparse ndarray serialization and deserialization (#77)

    * Initial checkin
    
    * Add unit tests
    
    * Fix lint
    reminisce authored and eric-haibin-lin committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    3d2d1c0 View commit details
    Browse the repository at this point in the history
  2. Fix lint (#84)

    reminisce authored and eric-haibin-lin committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    1e86dbf View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2017

  1. Sgd with row_sparse weight, dns gradient (#83)

    * sgd rsp dns draft
    
    * support sgd_mom(rsp, dns, rsp)
    
    * update doc
    
    * remove cast storage for kv updater
    
    * code refactoring
    eric-haibin-lin authored Jun 13, 2017
    Configuration menu
    Copy the full SHA
    86f896a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df49954 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3fc1703 View commit details
    Browse the repository at this point in the history
  4. benchmark dot code refactor (#87)

    * q^x6x add some code in benchmark
    
    * refactor
    
    * minor fixes
    
    * fix
    
    * lint fix
    jiajiechen authored and eric-haibin-lin committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    972647d View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2017

  1. Add unit test (#91)

    * add unittest
    
    * minor fix
    
    * remove commented lines
    
    * change test func name
    
    * add test rsp
    jiajiechen authored and eric-haibin-lin committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    31a0233 View commit details
    Browse the repository at this point in the history
  2. kvstore push row sparse (#93)

    * Add multi-thread cpu elemwise sum for rsps
    
    * Minor fix
    
    * Add flag to switch between serial and multi-thread kvstore push
    
    * Fix lint in sparse_ndarray.py
    
    * Revert "Fix lint in sparse_ndarray.py"
    
    This reverts commit d7225ec.
    
    * Fix ndarray init in copy(ctx)
    
    * Add env var to control the flow of serial/parallel reduce
    
    * Refactor
    
    * Fix copy ndarray bug
    
    * Fix lint
    
    * Refactor
    reminisce authored and eric-haibin-lin committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    0b021d5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    073d8f2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a129e4 View commit details
    Browse the repository at this point in the history
  5. Revert "update mshadow submoduel (#95)" (#96)

    This reverts commit 1a129e4.
    eric-haibin-lin authored Jun 14, 2017
    Configuration menu
    Copy the full SHA
    b2b3af2 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2017

  1. Refactor sparse tensor code (#99)

    * Initial checkin test_sparse_ndarray passes
    
    * Fix test failure
    
    * Clean up
    
    * Clean up
    
    * Move init backend op to ndarray_utils
    
    * Fix lint
    
    * Eliminate circular dependency on headers
    
    * More refactor
    
    * Fix gpu build and consolidate Slice for dense and sparse
    
    * Clean up
    
    * More refactor
    
    * Clean up
    
    * Fix gpu build
    
    * Fix comment
    reminisce authored and eric-haibin-lin committed Jun 19, 2017
    Configuration menu
    Copy the full SHA
    24105cf View commit details
    Browse the repository at this point in the history
  2. fix pylint (#100)

    eric-haibin-lin committed Jun 19, 2017
    Configuration menu
    Copy the full SHA
    ddbe565 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2017

  1. Fix refactor sparse gpu test (#104)

    * Fix gpu build
    
    * Fix
    
    * Fix gpu test failure
    reminisce authored and eric-haibin-lin committed Jun 21, 2017
    Configuration menu
    Copy the full SHA
    905304c View commit details
    Browse the repository at this point in the history
  2. change idx types from int32 to int64 (#101)

    Conflicts:
    	python/mxnet/test_utils.py
    	tests/python/unittest/test_sparse_operator.py
    
    update mshadow submodule
    
    fix extra quotes in test script
    
    change indptr type to int64
    
    better err message for rsp"
    eric-haibin-lin authored Jun 21, 2017
    Configuration menu
    Copy the full SHA
    a9612e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c134687 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1914471 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2017

  1. Configuration menu
    Copy the full SHA
    ad8e74c View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2017

  1. Refactor cast storage (#109)

    * Refactor cast_storage
    
    * Add cast_storage cc and cu files
    
    * Remove redundant comments
    
    * Replace std::accumulate with ParallelAccumulate
    
    * Clean up
    
    * Fix windows build
    reminisce authored and eric-haibin-lin committed Jun 23, 2017
    Configuration menu
    Copy the full SHA
    ac554ac View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2017

  1. Rowsparse kv (#111)

    * update kvstore unit test
    
    Conflicts:
    	tests/python/unittest/test_kvstore.py
    
    update model/module.py
    
    Conflicts:
    	python/mxnet/model.py
    	python/mxnet/module/module.py
    
    fix lint
    
    resolve conflict
    
    remove int keys in kvstore
    
    update cast to str function
    
    * fix failed dist_sync_kv test
    
    * bug fix in comm to ensure merged gradient is of the right type
    
    bug fix in comm
    
    * row sparse dist kvstore draft (push only)
    
    row_sparse pull
    
    * add ndarray row sparse shared mem constructor
    
    * code refactoring
    
    * add test for row_sparse weight
    
    bug fix for kv server slicing
    
    add async support
    
    rsolve race condition in kvstore
    
    * resolve error after reb ase
    eric-haibin-lin authored Jun 25, 2017
    Configuration menu
    Copy the full SHA
    2727528 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2017

  1. fix lint (#113)

    eric-haibin-lin authored Jun 26, 2017
    Configuration menu
    Copy the full SHA
    4d4fbc7 View commit details
    Browse the repository at this point in the history
  2. rename some python funciton (#114)

    * _to_rsp
    
    * _to_csr. raise NotImplementedError
    
    * todense
    eric-haibin-lin authored Jun 26, 2017
    Configuration menu
    Copy the full SHA
    f8556cc View commit details
    Browse the repository at this point in the history
  3. fix lint (#115)

    eric-haibin-lin authored Jun 26, 2017
    Configuration menu
    Copy the full SHA
    cb5deca View commit details
    Browse the repository at this point in the history