Open AmesingFlank opened 2 years ago
Maybe it's a serialization issue. Can Metal AOT save a file?
Maybe it's a serialization issue. Can Metal AOT save a file?
Yeah, metal works fine.
Hmm, I've been thinking about this. I feel like the final file-saving should be moved out from C++ to Python. AotModuleBuilder
should just return a few txt/binary files to Python.
huh metal works fine, that's weird, as the runtime error comes out of something that should have nothing to do with the backend arch.
std::FILE *f = fopen(fn.c_str(), "wb");
if (f == nullptr) {
TI_ERROR("Cannot open file [{}] for writing. (Does the directory exist?)",
fn);
assert(f != nullptr);
}
I feel like it's probably just some weird thing about macOS file paths.
Another thing I noticed that might be related: if I use #if 1
in SPIR-V codegen, the .spv file won't actually be dumped. It doesn't throw an error, but I can't find the file anywhere.
Describe the bug The AOT module
save
method crashes on macOSTo Reproduce Run the following code:
Log/Screenshots
Additional comments This works fine on Windows though.