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

Does neno CPU backend support native C code? #218

Closed
jinhou opened this Issue Mar 17, 2016 · 6 comments

Comments

Projects
None yet
5 participants
@jinhou

jinhou commented Mar 17, 2016

Hi, I am wondered the CPU backend is implemented with python code or native C code? I am trying to run the example code with only CPU. It seemed that only one CPU core was utilized.

Thanks
Jinlong

@yinyinl

This comment has been minimized.

Show comment
Hide comment
@yinyinl

yinyinl Mar 17, 2016

Contributor

The CPU backend is implemented with python by wrapping numpy. And the interfaces are consistent with the GPU backend or any other backend in the future to form this MOP layer, which allows easy switch from neon.

Contributor

yinyinl commented Mar 17, 2016

The CPU backend is implemented with python by wrapping numpy. And the interfaces are consistent with the GPU backend or any other backend in the future to form this MOP layer, which allows easy switch from neon.

@scttl scttl added the question label Mar 17, 2016

@hanlin-nervana

This comment has been minimized.

Show comment
Hide comment
@hanlin-nervana

hanlin-nervana Mar 17, 2016

Hi Jinlong,

Since the CPU backend wraps numpy, you can install OpenBLAS (see optional packages udner http://neon.nervanasys.com/docs/latest/installation.html) to enable multi-core CPU. You would have to do the following within the neon virtual environment:

  1. Install OpenBLAS (http://www.openblas.net/)
  2. Reinstall and configure numpy for OpenBLAS [edit numpy's site.cfg file and link to your openblas library]

Here are sample instructions for ubuntu OS: https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/

hanlin-nervana commented Mar 17, 2016

Hi Jinlong,

Since the CPU backend wraps numpy, you can install OpenBLAS (see optional packages udner http://neon.nervanasys.com/docs/latest/installation.html) to enable multi-core CPU. You would have to do the following within the neon virtual environment:

  1. Install OpenBLAS (http://www.openblas.net/)
  2. Reinstall and configure numpy for OpenBLAS [edit numpy's site.cfg file and link to your openblas library]

Here are sample instructions for ubuntu OS: https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/

@tambetm

This comment has been minimized.

Show comment
Hide comment
@tambetm

tambetm Mar 17, 2016

Just a minor inconsistency between GPU and CPU backends - CPUTensor.asnumpyarray() returns shared instance (pointer), while GPUTensor.asnumpyarray() always returns a new instance (copy). I had a very hard-to-find bug regarding this.

tambetm commented Mar 17, 2016

Just a minor inconsistency between GPU and CPU backends - CPUTensor.asnumpyarray() returns shared instance (pointer), while GPUTensor.asnumpyarray() always returns a new instance (copy). I had a very hard-to-find bug regarding this.

@scttl

This comment has been minimized.

Show comment
Hide comment
@scttl

scttl Mar 17, 2016

Contributor

Hi Tambet,

You'll be happy to know that we recently corrected this inconsistent behavior as part of: 1eda2b0

Contributor

scttl commented Mar 17, 2016

Hi Tambet,

You'll be happy to know that we recently corrected this inconsistent behavior as part of: 1eda2b0

@jinhou

This comment has been minimized.

Show comment
Hide comment
@jinhou

jinhou Mar 19, 2016

Hi Hanlin,

Thanks for your reply. That means the CPU performance should be very poor in neon compared with other DL frameworks, which have dedicated CPU code for conv layers and other nn layers implementation? Do you have any plan to add optimized CPU code in your framework?

Thanks
Jinlong

jinhou commented Mar 19, 2016

Hi Hanlin,

Thanks for your reply. That means the CPU performance should be very poor in neon compared with other DL frameworks, which have dedicated CPU code for conv layers and other nn layers implementation? Do you have any plan to add optimized CPU code in your framework?

Thanks
Jinlong

@hanlin-nervana

This comment has been minimized.

Show comment
Hide comment
@hanlin-nervana

hanlin-nervana Mar 19, 2016

Hi Jinlong,

We would welcome contributions to the CPU backend. Right now we have optimized C code, but primarily for ingesting datasets and keeping the GPU fed with data.

Thanks!

Hanlin

hanlin-nervana commented Mar 19, 2016

Hi Jinlong,

We would welcome contributions to the CPU backend. Right now we have optimized C code, but primarily for ingesting datasets and keeping the GPU fed with data.

Thanks!

Hanlin

@scttl scttl closed this Apr 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment