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

x/image/draw: BiLinear.Scale shows GOARCH-dependent behaviour due to float operation differences #67029

Open
kortschak opened this issue Apr 24, 2024 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@kortschak
Copy link
Contributor

kortschak commented Apr 24, 2024

Go version

go1.22

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/home/user/.cache/go-build'
GOENV='/home/user/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/user/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/user'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/user/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-arm64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/user/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-arm64/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/user/src/github.com/kortschak/dex/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3886885416=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Run the tests in this change: kortschak/gifscaleissue#1 or the same locally on a linux/arm64 device (this is the go env above).

What did you see happen?

A difference in encoded image between the ubuntu run and darwin (arm64 — darwin/amd64 shows no difference).

What did you expect to see?

The same encoding.

Additional comments

This is undoubtedly due to FMA differences between arm64 and amd64 and may well be something that is not worth "fixing", but I wanted to raise it in case others see this issue. It arose in testing, and in the original case, I am just duplicating the golden images with a GOARCH tag to differentiate them.

@gopherbot gopherbot added this to the Unreleased milestone Apr 24, 2024
@ianlancetaylor
Copy link
Contributor

CC @nigeltao

@joedian joedian added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants