Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Bindings/Python/IRAttributes.cpp | ||
---|---|---|
714 | based on https://github.com/llvm/llvm-project/blob/a4bdb27538c3bc5b757976e47d663e63880451e3/mlir/lib/IR/AttributeDetail.h#L33-L41 I think this should always be 64 bits wide. |
mlir/lib/Bindings/Python/IRAttributes.cpp | ||
---|---|---|
714 | I guess this is really what you're pointing at? https://github.com/llvm/llvm-project/blob/a4bdb27538c3bc5b757976e47d663e63880451e3/mlir/include/mlir/IR/BuiltinTypes.td#L307 static constexpr unsigned kInternalStorageBitWidth = 64; Seems like that one should be kInternalStorageBitWidth = sizeof(uintptr_t) too? But maybe I'm missing something. |
mlir/lib/Bindings/Python/IRAttributes.cpp | ||
---|---|---|
714 | You can't edit inline comments? Weird... Anyway I was going to edit/add that this is all about host arch rather than target so maybe being mindful of sizeof(uintptr_t) > 64 is moot (are there 128bit architectures on the horizon?). |
mlir/lib/Bindings/Python/IRAttributes.cpp | ||
---|---|---|
714 |
yea that'd be my guess as well. but also.. CHERI kind of :) |
mlir/lib/Bindings/Python/IRAttributes.cpp | ||
---|---|---|
714 | A static_assert that IndexType::kInternalStorageBitWidth == 64 would be nice to explain where int64_t comes from | |
mlir/test/python/ir/array_attributes.py | ||
374 | np.int64 seems like the right type here (though I'm not actually sure what happens when the wrong type gets passed in, maybe it works somehow) | |
379 | I know the other tests here don't, but you could avoid the escaping by using CHECK{LITERAL}: https://llvm.org/docs/CommandGuide/FileCheck.html#directive-modifiers |
based on https://github.com/llvm/llvm-project/blob/a4bdb27538c3bc5b757976e47d663e63880451e3/mlir/lib/IR/AttributeDetail.h#L33-L41 I think this should always be 64 bits wide.