Skip to content

Conversation

@tjad
Copy link

@tjad tjad commented Nov 30, 2020

Mainly contains the STYPE work in progress . #51

@tjad tjad changed the title Ndarray - STYPE WIP WIP Ndarray - STYPE Nov 30, 2020
@tjad
Copy link
Author

tjad commented Dec 4, 2020

The code looks clean to me, changing no existing functionality. However, upon addition of this code, the functionality of NDArray breaks such that initialization of NDArray fills with random values when using .zeros, .ones, .array etc, it is also no longer possible to make assignments to the array correctly. It is as if the array handle is bad.

You will notice there are no code changes, only additions. The closest code change is addition of a local variable mStorageType.

To reproduce, checkout code and run in IRB

require 'mxnet'

a = MXNet::NDArray.ones(5)

[-1.80243e+08, 4.57118e-41, -1.80256e+08, 4.57118e-41, 0] <MXNet::NDArray 5 @cpu(0)>

Whichever initializer I use, the result is similar.

@tjad tjad changed the title WIP Ndarray - STYPE Ndarray - STYPE Dec 6, 2020
@mrkn
Copy link
Owner

mrkn commented Dec 10, 2020

@tjad This pull-request consists of different-purpose changes. Could you please separate them into multiple single-purpose pull-requests?

And, please remove the commit 7a00289.
rb_gc_mark should be called during GC marking phase.

@mrkn
Copy link
Owner

mrkn commented Dec 10, 2020

@tjad I'll work on preparing the master branch for simplifying this pull-request by picking some commits in this pull-request this weekend. After that, I want you to rebase this branch onto the latest master.

@tjad
Copy link
Author

tjad commented Dec 10, 2020

@mrkn Sounds like a plan. And thanks!

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

Successfully merging this pull request may close these issues.

2 participants