Skip to content

Commit bae3119

Browse files
artifacts
1 parent 1839979 commit bae3119

File tree

6 files changed

+12
-83
lines changed

6 files changed

+12
-83
lines changed

DefaultPlatform.toml

Lines changed: 0 additions & 71 deletions
This file was deleted.

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ authors = ["Francisco Heron de Carvalho Junior <heron@dc.ufc.br> and contributor
44
version = "0.1.0"
55

66
[deps]
7+
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
78
CpuId = "adafc99b-e345-5852-983c-f28acb93d879"
89
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
910
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

src/PlatformAware.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using CpuId
88
using XMLDict
99
using TOML
1010
using JSON
11+
using Artifacts
1112

1213
# quantifiers
1314
include("quantifiers/atleast.jl")

src/awareness.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
return d
2424
end
2525

26-
global package_path = pkgdir(@__MODULE__)
26+
global database_path = joinpath(pkgdir(@__MODULE__), "src","platforms")
2727

2828
@sync begin
2929

30-
Threads.@spawn global processor_dict_intel = readDB(package_path * "/src/platforms/intel/db-processors.Intel.csv")
31-
Threads.@spawn global processor_dict_amd = readDB(package_path * "/src/platforms/amd/db-processors.AMD.csv")
30+
Threads.@spawn global processor_dict_intel = readDB(joinpath(database_path,"intel","db-processors.Intel.csv"))
31+
Threads.@spawn global processor_dict_amd = readDB(joinpath(database_path,"amd","db-processors.AMD.csv"))
3232

33-
Threads.@spawn global accelerator_dict_intel = readDB(package_path * "/src/platforms/intel/db-accelerators.Intel.csv")
34-
Threads.@spawn global accelerator_dict_amd = readDB(package_path * "/src/platforms/amd/db-accelerators.AMD.csv")
35-
Threads.@spawn global accelerator_dict_nvidia = readDB(package_path * "/src/platforms/nvidia/db-accelerators.NVIDIA.csv")
33+
Threads.@spawn global accelerator_dict_intel = readDB(joinpath(database_path,"intel","db-accelerators.Intel.csv"))
34+
Threads.@spawn global accelerator_dict_amd = readDB(joinpath(database_path,"amd/db-accelerators.AMD.csv"))
35+
Threads.@spawn global accelerator_dict_nvidia = readDB(joinpath(database_path,"nvidia","db-accelerators.NVIDIA.csv"))
3636

3737
end
3838

@@ -750,7 +750,6 @@ function setup()
750750
println(" 1) A file path pointed by a PLATFORM_DESCRIPTION environment variable;")
751751
println(" 2) The current directory;")
752752
println(" 3) The /etc/conf directory.")
753-
println("In the interactive environment, you may call PlatformAware.reload!() to reflect changes.")
754753
else
755754
TOML.print(stdout, platform_features)
756755
println(stderr)

src/features.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ function readPlatormDescription()
8888
println(stderr,"The platform description file (Platform.toml) was not found.")
8989
println(stderr,"Using default platform settings (calling only default kernels).")
9090
println(stderr,"A Platform.toml file may be created by calling PlatformAware.setup(). Do it !")
91-
default_platorm_file = pkgdir(@__MODULE__) * "/DefaultPlatform.toml"
92-
io = open(default_platorm_file)
91+
92+
io = joinpath(artifact"default_platform_description", "DefaultPlatform.toml")
9393
contents = read(io,String)
94-
close(io)
9594
contents
9695
end
9796
end

src/identification.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mutable struct PlatformFeatures
88
actual_platform_arguments_all
99
actual_platform_arguments
1010
function PlatformFeatures()
11-
new(IdDict(),IdDict(),IdDict(),IdDict())
11+
new(Dict(),Dict(),Dict(),Dict())
1212
end
1313
end
1414

@@ -76,7 +76,7 @@ defT =[
7676
:storage_interface => StorageInterface
7777
]
7878

79-
state.default_platform_types_all = IdDict(defT...)
79+
state.default_platform_types_all = Dict(defT...)
8080
state.default_platform_types = copy(state.default_platform_types_all)
8181

8282
function load!()

0 commit comments

Comments
 (0)