Skip to content

Commit 6d55ebd

Browse files
Remove another instance of access to AttributeMap::Map
PiperOrigin-RevId: 842768120
1 parent d774b64 commit 6d55ebd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jaxlib/call_location.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,14 @@ void PopulateCallLocation(xla::ifrt::ExecuteOptions& options,
124124
}
125125

126126
if (!call_location_str.empty()) {
127+
// Simplify this to use AttributeMap::Set().
127128
xla::ifrt::AttributeMap::Map attrs_map;
128129
if (options.custom_options.has_value()) {
129-
attrs_map = options.custom_options->map();
130+
options.custom_options->ForEach(
131+
[&](const std::string& key,
132+
const xla::ifrt::AttributeMap::Value& value) {
133+
attrs_map.insert({key, value});
134+
});
130135
}
131136
attrs_map.insert(
132137
{std::string(xla::ifrt::PjRtCompatibleLoadedExecutable::kCallLocation),

0 commit comments

Comments
 (0)