-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
V0.9.0 #22
Merged
Merged
V0.9.0 #22
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Depointerize Ap
…dimensions with 1 element). - included automated tests
Added a Transposed flag to DataOrder
Added a new way to distinguish non-standard allocating engines
fixed up Outer for colmajor
Concat doesn't work on cases where the inner dimensions are 1 yet though (example: (2,3,2) with (2,1,2)) - this is due to slices squeezing out the extra ones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v0.9.0
The changes made in this PR is aimed at better supporting v0.9.0 of Gorgonia itself. Along the way there are some new features and optimizations, as well as some bug fixes.
The majority of the work in supporting v0.9.0 of Gorgonia is to shore up the underlying architecture to support CUDA related engines. This means moving more things to rely on
Engine
while keeping the engine interface overheads low. Additionally this also means better support for column major data layouts.Engine
for most functions. This allows for extensibility on the data structure.RowVec
andColVec
has been removed (thanks to @matdodgson)ap.go
,iterator.go
,iterator_mult.go
.shape.go
, and the tests that were correct prior to this change have semantic meaning changes too.iterator_mult.go
- the solution of filling with ones is a little too dodgy for my liking. The alternative would be to changeBroadcastStrides
which will change even more things (Concat
,Stack
etc)AP
has been depointerized in*Dense
(thanks to @docmerlin). This reduces some amount of GC pointer chasing, but not all(array).fromSliceOrArrayer
,(array).fix()
and(array).forcefix()
are part of the improvement around the logic of allocating data.Concat
- see also Node.Value() panics without any error infomation gorgonia#218SampleIndex
that only show up when the slices have extreme lengths. This API should have been deprecated 2 years ago, but eh... it touched a lot of external projects.Diag
is made available. Relies heavily on anEngine
's implementationNewFlatIterator
is unexported.NewAP
is unexported.MakeAP
is used instead.(Tensor).DataOrder()
is added to the definiiton of what aTensor
is.(Shape).IsScalarEquiv()
is a new method. This corresponds to the change of semantics of what aShape
should be.(Shape).CalcStrides()
is exported now. This enables users to correctly calculate strides that are consistent to what the package expects.(Shape).CalcStridesColMajor()
is exported as the method to calculate the strides of a Col-Major*Dense
.NonStdEngine
is anEngine that does not allocate using the default allocator. This allows for both embedding a
DefaultEngine` while overriding the allocation behaviour.Diager
- any engine that can return a tensor that only contains the diagonal values of the inputNaNChecker
andInfChecker
- engines that can check a tensor for NaN and Inftensor
support #10)*FlatIterator
Support For ColMajor #34)native
is a subpackage that essentially gives users a native, Go-based iterator. Basically the ability to go from a*Dense
to a[][]T
or[][][]T
without extra allocations (for the data). This was pulled intomaster
earlier, but as of v0.9.0, the generic version is available too.Shape
has semantic changes regarding whether or not a shape is scalar. A scalar shape is defined to beShape{}
orShape{1}
only. Formerly,Shape{1,1}
was also considered to be scalar. Now they're considered to beScalarEquivalent
(along withShape{1, 1, .... , 1}
)Dtype
that is is orderable is also now comparable for equality. IfRegisterOrd
is called with a newDtype
, it is also automatically registered asEq
.