sunggg opened a new pull request, #15546:
URL: https://github.com/apache/tvm/pull/15546

   PR https://github.com/apache/tvm/pull/15447 introduces `vDevice` and 
currently, it causes compilation failure on my Mac with the following error:
   ```
   sung@spark-mbp build % gcc --version                                         
 
   Apple clang version 14.0.3 (clang-1403.0.22.14.1)
   Target: x86_64-apple-darwin22.3.0
   Thread model: posix
   InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
   ```
   ```
   /Users/sung/tvm/src/ir/global_info.cc:33:25: error: addition of default 
argument on redeclaration makes this constructor a default constructor
   VDevice::VDevice(Target tgt = {}, int dev_id = -1, MemoryScope mem_scope = 
{}) {
                           ^   ~~~~
   /Users/sung/tvm/include/tvm/ir/global_info.h:97:20: note: previous 
declaration is here
     TVM_DLL explicit VDevice(Target tgt, int dev_id, MemoryScope mem_scope);
                      ^
   1 error generated.
   make[2]: *** [CMakeFiles/tvm_objs.dir/src/ir/global_info.cc.o] Error 1
   make[2]: *** Waiting for unfinished jobs....
   make[1]: *** [CMakeFiles/tvm_objs.dir/all] Error 2
   ```
   This occurs due to the ambiguity with the default constructor defined within 
`TVM_DEFINE_OBJECT_REF_METHODS`. 
   Therefore, this PR eliminates such ambiguity by explicitly calling the 
constructor. 
   Since it requires explicit passing of the default arguments, I'd like to 
find a way to support previous usage (e.g., `VDevice()`) but I don't have good 
idea at the moment unfortunately. 
   cc. @yongwww 


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to