Repository navigation
A rollup of changes from the benvanik-aot-windows branch - #3760
Conversation
Useful in cases where /'s end up in them.
Prior to this it would run the expression twice on failure, resulting in double the error messages (and tons of other weirdness).
All of these will be fixed with the coming threading changes, but since those may take awhile to propagate to this level I'd rather have this not interfere with the burndown efforts taking measurements today.
| // Derive the base module name (path stem) for the loaded module. | ||
| // For example, the name of 'C:\Dev\foo.dll' would be 'foo'. | ||
| // This name is used by dbghelp for listing loaded modules and we want to | ||
| // ensure we match the name of the PDB module with the library module. | ||
| std::string module_name = file_name_; | ||
| size_t last_slash = module_name.find_last_of('\\'); | ||
| if (last_slash != std::string::npos) { | ||
| module_name = module_name.substr(last_slash + 1); | ||
| } | ||
| size_t dot = module_name.find_last_of('.'); | ||
| if (dot != std::string::npos) { | ||
| module_name = module_name.substr(0, dot); | ||
| } |
There was a problem hiding this comment.
We have a helper for this already: https://github.com/google/iree/blob/f9c11f20fc97154a7079a3809025241f5f467183/iree/base/file_path.h#L38-L39 (implementation in https://github.com/google/iree/blob/main/iree/base/file_path.cc). Want to use that? It would require some fiddling with / vs \\.
The code is simple, so forking here is fine with me. Keeping path manipulation code in one place makes it easier to test though.
There was a problem hiding this comment.
Yeah it's a \ / issue - having a decent ConvertPathToNative() that would switch based on platform would make this better, but I wanted to see the different ways we'd use it first :)
* 1ba69d9 Deduplicate flow.executable ops during Flow dialect transformation. (#3702) * 848b893 Seperate tensorflow coverage into multiple pages (#3758) * be8dd02 Merge pull request #3760 from google/benvanik-aot-windows-prework * 6d83db8 Adding support for embedding debug symbols (pdb/dwarf/etc) in dylibs. * 8a1347f Bumping tracy to disable vsync capture and expose the dbghelp lock. * 4dc7064 Improving error messages in iree-run-module with invalid function names. * 4d7805b Optimizations to reduce dispatch overhead. All of these will be fixed with the.. * d57efa3 Making IREE_CHECK_OK not double-evaluate. Prior to this it would run the expre.. * 10b400e Canonicalizing win32 paths prior to trying to open files. Useful in cases wher.. * f9c11f2 [spirv] Use addNestedPass<FuncOp>() for passes working on functions (#3745) * ab4cb7c Add static, dynamic and training tests for all tf.keras.layers (#3753) * aaf3377 Adopt pipeline-in-a-pass infra (#3741) * 43b1d76 Create template for Bug Reports (#3755) * d264a16 Remove unused deps from kws test (#3751) * 0601682 Add 'deep_copy' to bazel to allow variable reuse (#3750) * a70b1d1 Merge google -> main (#3749) COPYBARA_INTEGRATE_REVIEW=#3762 from ScottTodd:main-to-google 1ba69d9 PiperOrigin-RevId: 341484363
* 1ba69d9 Deduplicate flow.executable ops during Flow dialect transformation. (#3702) * 848b893 Seperate tensorflow coverage into multiple pages (#3758) * be8dd02 Merge pull request #3760 from google/benvanik-aot-windows-prework * 6d83db8 Adding support for embedding debug symbols (pdb/dwarf/etc) in dylibs. * 8a1347f Bumping tracy to disable vsync capture and expose the dbghelp lock. * 4dc7064 Improving error messages in iree-run-module with invalid function names. * 4d7805b Optimizations to reduce dispatch overhead. All of these will be fixed with the.. * d57efa3 Making IREE_CHECK_OK not double-evaluate. Prior to this it would run the expre.. * 10b400e Canonicalizing win32 paths prior to trying to open files. Useful in cases wher.. * f9c11f2 [spirv] Use addNestedPass<FuncOp>() for passes working on functions (#3745) * ab4cb7c Add static, dynamic and training tests for all tf.keras.layers (#3753) * aaf3377 Adopt pipeline-in-a-pass infra (#3741) * 43b1d76 Create template for Bug Reports (#3755) * d264a16 Remove unused deps from kws test (#3751) * 0601682 Add 'deep_copy' to bazel to allow variable reuse (#3750) * a70b1d1 Merge google -> main (#3749) COPYBARA_INTEGRATE_REVIEW=#3762 from ScottTodd:main-to-google 1ba69d9 PiperOrigin-RevId: 341484363
These were the fixes/tweaks/prep work done on that branch that are independent from the actual LLVM AOT linker refactoring.