FS#67696 - [julia] knet causes memory allocation fault

Attached to Project: Community Packages
Opened by Jan Vargas (andevellicus) - Sunday, 23 August 2020, 23:54 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 11 May 2023, 19:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Antonio Rojas (arojas)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using Knet (https://github.com/denizyuret/Knet.jl), causes a memory allocation fault. If julia-bin is installed from AUR, everything works fine. Suspect that dependencies are messing things up.


Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
- Install community Julia package via pacman -S julia
- Add Knet package in Julia
- Run the following code:

using Knet

loss(x, y) = prod(x .* y)

struct Chain; layers; end
(c::Chain)(x) = (for l in c.layers; x = l(x); end; x)

struct test_model; c; end
(m::test_model)(x) = m.c(x)

function test_model()
w = param(3, 3, 3, 1, 8)
c = Chain((
x->conv4(w, x, stride=2, padding=1),
x->unpool(x)
))
test_model(c)
end

function main()
model = test_model()
for i in 1:5
for j in 1:5
x = KnetArray(rand(Float32, 32, 32, 32, 1, 1))
y = KnetArray(rand(Float32, 32, 32, 32, 1, 1))
ld = @diff loss(model(x), y)
end
end
end

main()

This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 11 May 2023, 19:27 GMT
Reason for closing:  No response
Comment by Toolybird (Toolybird) - Wednesday, 03 May 2023, 04:29 GMT
Still happening with latest pkgs?

Loading...