Commit 2957a343 authored by sbl1996@126.com's avatar sbl1996@126.com

Use fmt

parent 8ebcc022
SCRIPTS_REPO := "https://github.com/Fluorohydride/ygopro-scripts.git"
SCRIPTS_DIR := "../ygopro-scripts"
DATABASE_REPO := "https://github.com/mycard/ygopro-database/raw/master/locales"
LOCALES := en zh
.PHONY: all assets script py_install ygoenv_so
all: assets script py_install
py_install: ygoenv_so
pip install -e ygoenv
pip install -e .
ygoenv_so: ygoenv/ygoenv/ygopro/ygopro_ygoenv.so
ygoenv/ygoenv/ygopro/ygopro_ygoenv.so:
xmake b ygopro_ygoenv
script : scripts/script
scripts/script:
if [ ! -d $(SCRIPTS_DIR) ] ; then git clone $(SCRIPTS_REPO) $(SCRIPTS_DIR); fi
ln -sf "../$(SCRIPTS_DIR)" scripts/script
assets: $(LOCALES)
$(LOCALES): % : assets/locale/%/cards.cdb assets/locale/%/strings.conf
assets/locale/en assets/locale/zh:
mkdir -p $@
assets/locale/en/cards.cdb: assets/locale/en
wget $(DATABASE_REPO)/en-US/cards.cdb -O $@
assets/locale/en/strings.conf: assets/locale/en
wget $(DATABASE_REPO)/en-US/strings.conf -O $@
assets/locale/zh/cards.cdb: assets/locale/zh
wget $(DATABASE_REPO)/zh-CN/cards.cdb -O $@
assets/locale/zh/strings.conf: assets/locale/zh
wget $(DATABASE_REPO)/zh-CN/strings.conf -O $@
\ No newline at end of file
#created by ...
#main
55623480
52467217
52467217
52467217
92826944
92826944
92826944
41562624
41562624
99423156
99423156
94801854
94801854
94801854
49959355
49959355
49959355
79783880
14558127
14558127
14558127
36630403
36630403
23434538
23434538
23434538
97268402
12580477
18144507
75500286
81439173
13965201
13965201
24224830
24224830
40364916
40364916
4333086
4333086
10045474
10045474
40605147
40605147
41420027
#extra
59843383
27548199
50954680
83283063
74586817
52711246
57288064
26326541
98558751
86066372
72860663
86926989
37129797
91420202
41999284
!side
......@@ -29,7 +29,6 @@
83308376
24224830
24224830
65681983
39730727
39730727
10045474
......
......@@ -7,18 +7,17 @@ add_requires(
"concurrentqueue 1.0.4", "sqlitecpp 3.2.1", "unordered_dense 4.4.*")
target("dummy_ygopro")
add_rules("python.library")
add_files("ygoenv/ygoenv/dummy/*.cpp")
add_packages("pybind11", "fmt", "glog", "concurrentqueue")
set_languages("c++17")
set_policy("build.optimization.lto", true)
add_includedirs("ygoenv")
after_build(function (target)
local install_target = "$(projectdir)/ygoenv/ygoenv/dummy"
os.mv(target:targetfile(), install_target)
print("move target to " .. install_target)
end)
-- target("dummy_ygopro")
-- add_rules("python.library")
-- add_files("ygoenv/ygoenv/dummy/*.cpp")
-- add_packages("pybind11", "fmt", "glog", "concurrentqueue")
-- set_languages("c++17")
-- add_includedirs("ygoenv")
-- after_build(function (target)
-- local install_target = "$(projectdir)/ygoenv/ygoenv/dummy"
-- os.cp(target:targetfile(), install_target)
-- print("Copy target to " .. install_target)
-- end)
target("ygopro_ygoenv")
......@@ -26,15 +25,14 @@ target("ygopro_ygoenv")
add_files("ygoenv/ygoenv/ygopro/*.cpp")
add_packages("pybind11", "fmt", "glog", "concurrentqueue", "sqlitecpp", "unordered_dense", "ygopro-core")
set_languages("c++17")
add_cxxflags("-flto=auto -fno-fat-lto-objects -fvisibility=hidden -march=native")
if is_mode("release") then
set_policy("build.optimization.lto", true)
add_cxxflags("-march=native")
end
add_includedirs("ygoenv")
-- for _, header in ipairs(os.files("ygoenv/ygoenv/core/*.h")) do
-- set_pcxxheader(header)
-- end
after_build(function (target)
local install_target = "$(projectdir)/ygoenv/ygoenv/ygopro"
os.mv(target:targetfile(), install_target)
print("Move target to " .. install_target)
os.cp(target:targetfile(), install_target)
print("Copy target to " .. install_target)
end)
......@@ -28,7 +28,7 @@ class Agent(nn.Module):
c = channels
self.loc_embed = nn.Embedding(9, c)
self.loc_norm = nn.LayerNorm(c, elementwise_affine=affine)
self.seq_embed = nn.Embedding(41, c)
self.seq_embed = nn.Embedding(61, c)
self.seq_norm = nn.LayerNorm(c, elementwise_affine=affine)
linear = lambda in_features, out_features: nn.Linear(in_features, out_features, bias=bias)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment