Giter Club home page Giter Club logo

Comments (9)

manuEbg avatar manuEbg commented on May 29, 2024 1

@manuEbg can you try:

const libknet8 = Libdl.find_library(["libknet8"], try [artifact"libknet8"]; catch ex; []; end)                                      

Hey @denizyuret , I am very sorry, but I absolutely lost track of this one.

I just noticed you implemented the suggested solution with 553a5b6 .

However I still get

ERROR: The following 1 direct dependency failed to precompile:

Knet [1902f260-5fb4-5aff-8c31-6271790ab950]

Failed to precompile Knet [1902f260-5fb4-5aff-8c31-6271790ab950] to /home/vscode/.julia/compiled/v1.7/Knet/jl_z37ZHU.
ERROR: LoadError: Cannot locate artifact 'libknet8' for aarch64-linux-gnu-libgfortran4-cxx11-libstdcxx29-julia_version+1.7.3 in '/home/vscode/.julia/packages/Knet/YIFWC/Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] artifact_slash_lookup(name::String, artifact_dict::Dict{String, Any}, artifacts_toml::String, platform::Base.BinaryPlatforms.Platform)
    @ Artifacts /usr/local/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:608
  [3] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any, platform::Nothing)
    @ Artifacts /usr/local/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:678
  [4] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any)
    @ Artifacts /usr/local/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:641
  [5] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [6] include(x::String)
    @ Knet ~/.julia/packages/Knet/YIFWC/src/Knet.jl:1
  [7] top-level scope
    @ ~/.julia/packages/Knet/YIFWC/src/Knet.jl:17
  [8] include
    @ ./Base.jl:418 [inlined]
  [9] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
 [10] top-level scope
    @ none:1
 [11] eval
    @ ./boot.jl:373 [inlined]
 [12] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [13] top-level scope
    @ none:1
in expression starting at /home/vscode/.julia/packages/Knet/YIFWC/src/libknet8/LibKnet8.jl:7
in expression starting at /home/vscode/.julia/packages/Knet/YIFWC/src/libknet8/LibKnet8.jl:3
in expression starting at /home/vscode/.julia/packages/Knet/YIFWC/src/Knet.jl:1

from knet.jl.

denizyuret avatar denizyuret commented on May 29, 2024

Dear @manuEbg: The libknet8 library is only needed if you want to use the GPU. As far as I know this is not possible with the Macs at the moment as CUDA.jl no longer supports them. Do you just want a clean install for cpu use only?

from knet.jl.

manuEbg avatar manuEbg commented on May 29, 2024

Hey @denizyuret,
thank you very much for you're reply!
Yes I only want to get started with julia and Knet and wanna do some basic Learning Stuff inside a clean docker-container.
No need for GPU-Acceleration at this point:)
So is there a way to install knet without GPU-support?

from knet.jl.

denizyuret avatar denizyuret commented on May 29, 2024

@maleadt: we seem to have a problem in Knet where the installation gets stuck on a new architecture with no gpu support because it cannot locate the libknet8.so artifact. In these cases we want the installation to proceed with no libknet8. Thinking that you may have had a similar problem in CUDA.jl and its artifacts I wanted to pick your brain -- do you have any suggestions?

from knet.jl.

maleadt avatar maleadt commented on May 29, 2024

Wrap the (function that calls the) artifact macro in try/catch? https://github.com/JuliaGPU/CUDA.jl/blob/e1ba6121e4d32a5d90b6f1849926e9b4f0062700/deps/bindeps.jl#L95-L100

from knet.jl.

denizyuret avatar denizyuret commented on May 29, 2024

@manuEbg can you try:

const libknet8 = Libdl.find_library(["libknet8"], try [artifact"libknet8"]; catch ex; []; end)                                      

from knet.jl.

manuEbg avatar manuEbg commented on May 29, 2024

This also falls into the same error.
It does not really make sense to me.

try 
     tempLibVar = Libdl.find_library(["libknet8"],[artifact"libknet8"])
catch ex 
     print("I catched the Exception");
end

from knet.jl.

manuEbg avatar manuEbg commented on May 29, 2024

I did some more test.

try
    artifact"notExistent"
catch ex
    print("Got it")
end
try
    platform = Base.BinaryPlatforms.HostPlatform()
    rand(4,4) * rand(5,5)
    @artifact_str("notExistent", platform)
catch ex
    print("Got it: $ex")
end

Both of the above result in :

ERROR: LoadError: Cannot locate '(Julia)Artifacts.toml' file when attempting to use artifact 'notExistent' in 'Main'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any, platform::Any)
    @ Artifacts /usr/local/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:647
  [3] eval
    @ ./boot.jl:373 [inlined]
  [4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1196
  [5] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./essentials.jl:716
  [6] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:714
  [7] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:211
  [8] (::VSCodeServer.var"#65#69"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:155
  [9] withpath(f::VSCodeServer.var"#65#69"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:184
 [10] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:153
 [11] hideprompt(f::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:36
 [12] (::VSCodeServer.var"#63#67"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:124
 [13] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
 [14] with_logger
    @ ./logging.jl:623 [inlined]
 [15] (::VSCodeServer.var"#62#66"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:201
 [16] #invokelatest#2
    @ ./essentials.jl:716 [inlined]
 [17] invokelatest(::Any)
    @ Base ./essentials.jl:714
 [18] macro expansion
    @ ~/.vscode-server/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [19] (::VSCodeServer.var"#60#61")()
    @ VSCodeServer ./task.jl:429

However this one:

try
    platform = Base.BinaryPlatforms.HostPlatform()
    rand(4,4) * rand(5,5)
    # @artifact_str("notExistent", platform)
catch ex
    print("Got it: $ex")
end

results in:

Got it: DimensionMismatch("A has dimensions (4,4) but B has dimensions (5,5)")

I think this behaviour is very strange

from knet.jl.

dpo avatar dpo commented on May 29, 2024

Same issue on FreeBSD:

LoadError: Cannot locate artifact 'libknet8' for x86_64-unknown-freebsd-libgfortran5-cxx11-julia_version+1.7.3 in '/.julia/packages/Knet/YIFWC/Artifacts.toml'

https://cirrus-ci.com/task/6610845332406272?logs=test#L201

All seems well on the GitHub Actions VMs (Ubuntu, macOS and Windows64), even though I imagine they don't have a GPU either.

from knet.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.