kumasento edited a comment on issue #4748: [RELAY] Support RelayBuild with Only 
Constants
URL: https://github.com/apache/incubator-tvm/issues/4748#issuecomment-583775765
 
 
   Thanks @tqchen , I've proposed a tentative implementation of this dummy 
function idea #4847. The script in this issue can be built successively now.
   
   `lib.get_source()` output:
   
   ```
   Operator library:
    ; ModuleID = '__dummy__'
   source_filename = "__dummy__"
   target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
   target triple = "x86_64-pc-linux-gnu"
   
   @__tvm_main__ = weak local_unnamed_addr constant [10 x i8] c"__dummy__\00", 
align 1
   
   ; Function Attrs: norecurse nounwind readnone
   define dllexport i32 @__dummy__() local_unnamed_addr #0 !dbg !5 {
   entry:
     ret i32 0, !dbg !9
   }
   
   attributes #0 = { norecurse nounwind readnone }
   
   !llvm.dbg.cu = !{!0}
   !llvm.module.flags = !{!3, !4}
   
   !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "TVM", 
isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, 
dwoId: 1)
   !1 = !DIFile(filename: "model.tvm", directory: "/tmp/")
   !2 = !{}
   !3 = !{i32 2, !"tvm_target", !"llvm"}
   !4 = !{i32 4, !"Debug Info Version", i32 3}
   !5 = distinct !DISubprogram(name: "__dummy__", scope: !1, file: !1, type: 
!6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: 
true, unit: !0, variables: !2)
   !6 = !DISubroutineType(types: !7)
   !7 = !{!8}
   !8 = !DIBasicType(name: "int32", size: 32, encoding: DW_ATE_signed)
   !9 = !DILocation(line: 0, scope: !5)
   ```
   
   There is one more question though: what the `target` of the dummy function 
should be? I currently set it to `llvm`.
   

----------------------------------------------------------------
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