tqchen commented on a change in pull request #4274: [µTVM] Enable AutoTVM for 
ARM STM32F746XX Boards
URL: https://github.com/apache/incubator-tvm/pull/4274#discussion_r343908899
 
 

 ##########
 File path: python/tvm/contrib/binutil.py
 ##########
 @@ -125,74 +146,73 @@ def tvm_callback_relocate_binary(
     rel_bin : bytearray
         the relocated binary
     """
-    tmp_dir = util.tempdir()
-    rel_obj_path = tmp_dir.relpath("relocated.o")
-    ld_script_contents = ""
+    stack_pointer_init = stack_end - word_size
+
+    ld_script_contents = ''
     # TODO(weberlo): There should be a better way to configure this for 
different archs.
-    if "riscv" in toolchain_prefix:
-        ld_script_contents += "OUTPUT_ARCH( \"riscv\" )\n\n"
-    # TODO(weberlo): Generate the script in a more procedural manner.
-    ld_script_contents += """
+    if 'riscv' in toolchain_prefix:
+        ld_script_contents += 'OUTPUT_ARCH( \"riscv\" )\n\n'
+    ld_script_contents += f"""
+/* linker symbol for use in UTVMInit */
 
 Review comment:
   consider define this piece of code in as a global variable, so that the code 
structure is more clear

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to