Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress of CUDA kernelize (Feature point of View) #37

Open
53 of 80 tasks
sonots opened this issue Feb 25, 2018 · 1 comment
Open
53 of 80 tasks

Progress of CUDA kernelize (Feature point of View) #37

sonots opened this issue Feb 25, 2018 · 1 comment

Comments

@sonots
Copy link
Owner

sonots commented Feb 25, 2018

Store

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E8%A6%81%E7%B4%A0%E3%81%AE%E6%A0%BC%E7%B4%8D

  • store(another_array)
  • fill(item)
  • seq([begin, step]), indgen
  • logseq(begin, step [,base])
  • eye([element, offset])
  • rand([[low,] high])

Data Creation

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E3%83%87%E3%83%BC%E3%82%BF%E7%94%9F%E6%88%90

  • Cumo::DFloat[1,2,3,5,7,11]
  • Cumo::DFloat[1..100]
  • Cumo::DFloat.cast(Cumo::Int32[1,2,3,5,7,11])
  • Cumo::DFloat.zeros(120)
  • Cumo::DFloat.ones(2,4,6)
  • Cumo::DFloat.linspace(-5,5,7)
  • Cumo::DFloat.logspace(4,0,5,2)

Indexing

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E9%85%8D%E5%88%97%E3%81%AE%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9

  • a[1,2,3] (synchronizes, though)
  • a[39] (synchronizes, though)

View

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E9%85%8D%E5%88%97%E3%81%AE%E3%83%93%E3%83%A5%E3%83%BC

Reshape

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E9%85%8D%E5%88%97%E6%93%8D%E4%BD%9C

  • flatten([dim0,dim1,...])
  • transpose([dim0,dim1,...])
  • expand_dims(dim)
  • diagonal(offset, [ax1,ax2])
  • reshape

Operations

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E9%85%8D%E5%88%97%E6%BC%94%E7%AE%97

  • + (binary)
  • - (binary)
  • * (binary)
  • / (binary)
  • % (binary)
  • divmod (binary2)
  • ** (pow)
  • -@ (unary_s)
  • abs (unary2)

All of upcast, broadcast, coerce, inplace operations are supported by numo #framework.

Condition and Bit

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E6%9D%A1%E4%BB%B6%E5%BC%8F%E3%81%A8bit%E5%9E%8B

narray

  • eq (binary)
  • ne (binary)
  • gt (>) (cond_binary)
  • ge (>=) (cond_binary)
  • lt (<) (cond_binary)
  • le (<=) (cond_binary)
  • neary_eq (cond_unary)
  • isnan (cond_unary)
  • isinf (cond_unary)
  • isfinite (cond_unary)

Bit

  • and (&)
  • or (|)
  • xor (^)
  • not (~)
  • count_true
  • count_false
  • all?
  • any?
  • none?
  • where

Statistics

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#%E7%B5%B1%E8%A8%88%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89

  • sum
  • prod
  • mean
  • stddev
  • var
  • rms
  • min
  • min_index
  • max
  • max_index
  • minmax
  • cumsum
  • cumprod
  • sort
  • sort_index
  • median

Math

https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81#nmath

unary functions

  • reciprocal
  • sign
  • square
  • floor (float)
  • round (float)
  • ceil (float)
  • trunc (float)
  • rint (float)
  • conj (complex)
  • im (complex)
  • sqrt
  • pow
  • exp
  • log
  • 三角関数
@sonots
Copy link
Owner Author

sonots commented Feb 25, 2018

For red-chainer mnist:

  • Warning: Method "rand" for dtype "dfloat" is running under CPU.
  • Warning: Method "dfloat" for dtype "DFloat" is running under CPU.
  • Warning: Method "array" for dtype "int32" is running under CPU.
  • Warning: Method "uint8" for dtype "UInt8" is running under CPU.
  • Warning: Method "uint8" for dtype "UInt8" is running under CPU.
  • Warning: Method "array" for dtype "int64" is running under CPU.
  • Warning: Method "array" for dtype "dfloat" is running under CPU.
  • Warning: Method "rand_norm" for dtype "dfloat" is running under CPU.
  • Warning: Method "le" for dtype "dfloat" is running under CPU.
  • Warning: Method "int64" for dtype "Int64" is running under CPU.
  • Warning: Method "int32" for dtype "Int32" is running under CPU.
  • Warning: Method "lt" for dtype "int32" is running under CPU.
  • Warning: Method "seq" for dtype "int32" is running under CPU.
  • Warning: Method "int32" for dtype "Int32" is running under CPU.
  • Warning: Method "eq" for dtype "dfloat" is running under CPU.
  • Warning: Method "ne" for dtype "int32" is running under CPU.
  • Warning: Method "max_index" for dtype "dfloat" is running under CPU.
  • Warning: Method "int32" for dtype "Int32" is running under CPU.
  • Warning: Method "bit" for dtype "Bit" is running under CPU.
  • Warning: Method "gt" for dtype "dfloat" is running under CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant