Skip to content

Commit

Permalink
[USMP] Change internal workspace section (apache#11246)
Browse files Browse the repository at this point in the history
This commit changes the internal workspace generation
to be under .bss.noinit.* with NOLOAD behaviour as it
does not need any form initialization.
  • Loading branch information
manupak authored and Yuanjing Shi committed May 17, 2022
1 parent 91730be commit 5adac43
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions apps/microtvm/cmsisnn/corstone300.ld
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ SECTIONS

} > DTCM

.bss.NoInit :
.bss.noinit (NOLOAD):
{
. = ALIGN(16);
*(.bss.NoInit)
*(.bss.noinit.*)
. = ALIGN(16);
} > DDR AT > DDR
} > SRAM AT > SRAM

.bss :
{
Expand Down
6 changes: 3 additions & 3 deletions apps/microtvm/ethosu/corstone300.ld
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ SECTIONS

} > DTCM

.bss.NoInit :
.bss.noinit (NOLOAD):
{
. = ALIGN(16);
*(.bss.NoInit)
*(.bss.noinit.*)
. = ALIGN(16);
} > DDR AT > DDR
} > SRAM AT > SRAM

.bss :
{
Expand Down
2 changes: 1 addition & 1 deletion src/target/source/source_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class CSourceCrtMetadataModuleNode : public runtime::ModuleNode {
for (const auto& kv : metadata_->pool_inputs.value()) {
tir::usmp::AllocatedPoolInfo allocated_pool_info = kv.second;
if (allocated_pool_info->pool_info->is_internal) {
code_ << "__attribute__((section(\".data.tvm\"), ";
code_ << "__attribute__((section(\".bss.noinit.tvm\"), ";
code_ << "aligned(" << 16 << ")))\n";
code_ << "static uint8_t " << allocated_pool_info->pool_info->pool_name << "["
<< allocated_pool_info->allocated_size->value << "];\n";
Expand Down
6 changes: 3 additions & 3 deletions tests/python/relay/aot/corstone300.ld
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ SECTIONS
. = ALIGN(16);
} > SRAM AT > SRAM

.bss.NoInit :
.bss.noinit (NOLOAD):
{
. = ALIGN(16);
*(.bss.NoInit)
*(.bss.noinit.*)
. = ALIGN(16);
} > DDR AT > DDR
} > SRAM AT > SRAM

.bss :
{
Expand Down

0 comments on commit 5adac43

Please sign in to comment.