Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion SCRAM/GMake/Makefile.edmplugin
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ endef
define edm_write_config_imp
$(CMD_rm) -rf $(<D)/$(EDM_WRITE_CONFIG_DB) && $(CMD_mkdir) -p $(<D)/$(EDM_WRITE_CONFIG_DB) &&\
$(CMD_echo) "@@@@ Running $(strip $2 EDM) write config for $(1)" &&\
($(CMD_cd) $(<D)/$(EDM_WRITE_CONFIG_DB) && $(EDM_TOOLS_PREFIX) $(EDM_WRITE_CONFIG) -p $(LOCALTOP)/$<) &&\
($(CMD_cd) $(<D)/$(EDM_WRITE_CONFIG_DB) && \
$(EDM_TOOLS_PREFIX) \
$(if $($(1)_rocm),LD_LIBRARY_PATH=$(RELEASETOP)/external/$(SCRAM_ARCH)/lib/scram_rocm:$$LD_LIBRARY_PATH) \
$(EDM_WRITE_CONFIG) -p $(LOCALTOP)/$<) &&\
$(CMD_touch) $(SCRAM_INTwork)/$(SCRAM_SOURCEDIR)/$($(1)_PROD_PACKAGE)/.$(EDM_WRITE_CONFIG_DB) &&\
for file in `$(CMD_ls) $(<D)/$(EDM_WRITE_CONFIG_DB)`; do \
$(CMD_cp) -f $(<D)/$(EDM_WRITE_CONFIG_DB)/$$file $(SCRAMSTORENAME_CFIPYTHON)/$($(1)_PROD_PACKAGE) &&\
Expand Down
31 changes: 26 additions & 5 deletions SCRAM/Plugins/BuildRules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,11 +1208,32 @@ def Project_template(self):
fh.write("{0}:=$(if $(strip $(_BUILD_TIME_MICROARCH)),$({1})/$(_BUILD_TIME_MICROARCH),$({1}))\n".format(pluginDir, dir))
refreshcmd = self.getPluginData("Refresh", ptype)
cachefile = self.getPluginData("Cache", ptype)
fh.write("PLUGIN_REFRESH_CMDS += {0}\n"
"define do_{0}\n"
" $(CMD_echo) \"@@@@ Refreshing Plugins:{0} for $(1)\" &&\\\n"
"$(EDM_TOOLS_PREFIX) {0} $(1)\n"
"endef\n".format(refreshcmd))
if refreshcmd == "edmPluginRefresh":
fh.write(
"PLUGIN_REFRESH_CMDS += edmPluginRefresh\n"
"define do_edmPluginRefresh\n"
" $(CMD_echo) \"@@@@ Refreshing non-ROCm Plugins:edmPluginRefresh for $(1)\" &&\\\n"
" rm -f $(1)/.edmplugincache &&\\\n"
" normal_plugins=\"$(foreach p,$(sort $(ALL_PRODS) $(ALL_EXTERNAL_PLUGIN_PRODS)),"
"$(if $($(p)_rocm),,$(wildcard $(1)/plugin$(p).so)))\" ;\\\n"
" if [ -n \"$$normal_plugins\" ]; then "
"$(EDM_TOOLS_PREFIX) edmPluginRefresh $$normal_plugins ; fi &&\\\n"
" $(CMD_echo) \"@@@@ Refreshing ROCm Plugins:edmPluginRefresh for $(1)\" &&\\\n"
" rocm_plugins=\"$(foreach p,$(sort $(ALL_PRODS) $(ALL_EXTERNAL_PLUGIN_PRODS)),"
"$(if $($(p)_rocm),$(wildcard $(1)/plugin$(p).so)))\" ;\\\n"
" if [ -n \"$$rocm_plugins\" ]; then "
"LD_LIBRARY_PATH=\"$(RELEASETOP)/external/$(SCRAM_ARCH)/lib/scram_rocm:$$LD_LIBRARY_PATH\" "
"$(EDM_TOOLS_PREFIX) edmPluginRefresh $$rocm_plugins ; fi\n"
"endef\n"
)
else:
fh.write(
"PLUGIN_REFRESH_CMDS += {0}\n"
"define do_{0}\n"
" $(CMD_echo) \"@@@@ Refreshing Plugins:{0} for $(1)\" &&\\\n"
"$(EDM_TOOLS_PREFIX) {0} $(1)\n"
"endef\n".format(refreshcmd)
)
for dir in self.getPluginProductDirs(ptype):
fh.write("$({4})/{0}: $(SCRAM_INTwork)/cache/{1}_{2} "
"$(SCRAM_INTwork)/cache/prod/{2}\n"
Expand Down