v0.8.0-rc0 Break in compatibility: DType int64 -> Go's int64 (it was Go's int) and many small improvements. #39
janpfeifer
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release fixes a long standing mistake: GoMLX previously made the assumption that Go
int
are 64 bits on the platforms that mattered -- it was made out of convenience in the early versions.With this release we have the following conversion changes:
DType
Int32
orInt64
depending on the bit size of the int (it usesstrconv.IntSize
to check). If the bitsize is different (128 bits?) it panics and simply doesn't convert. This doesn't break compatibility.DType
Int64
converting to Go will convert to (multi-dimension) slices ofint64
and no longerint
. This breaks compatibility, and may break your code!!. The fix is generally trivial, but still, it requires fixing.The breaking is not done lightly ... but it seems worth the fix. Hopefully, there will be fewer of those in the future on the main APIs, and soon I can build a 1.0 release.
This release also includes many small improvements and fixes, listed below.
This is still an RC release, expect a few changes before the full v0.8.0 release.
int64
-- breaks compatibility because DType Int64 when converted back to Go becomesint64
and not
int
.std::move
not necessary.xla/mlir/utils
library tothird-party/xla_mlir
, since it is not available in all XLA distributions.context
:context.GetParamOr
andcontext.GetGraphParamOr
: it uses generics to cast to the desired type, and allowing a default value to be returned.checkpoints
.train
:Loop
automatically sets LoopStep to context's "global_step" parameter.optimizer
: AddedGetGlobalStep
.context
: AddedContext.EnumerateVariablesInScope()
method.graph
:reduceAxes
parameter toL2Norm
andL1Norm
.L2NormSquare
,L2Normalize
andL2NormalizeWithEpsilon
.nanlogger
: addedAttachToTrainer
; improved docs.margaid
:This discussion was created from the release v0.8.0-rc0 Break in compatibility: DType int64 -> Go's int64 (it was Go's int) and many small improvements..
Beta Was this translation helpful? Give feedback.
All reactions