mirror of
https://github.com/ROCm/jax.git
synced 2025-04-16 11:56:07 +00:00
Fix accidental signature change to get_serialized_metadata() from nanobind PR.
pybind11 accepts either Python strings or bytes as a std::string argument, whereas nanobind accepts only strings. Change the argument to nb::bytes instead. PiperOrigin-RevId: 560086072
This commit is contained in:
parent
87cec1a6e8
commit
ac8ea86103
@ -134,10 +134,11 @@ NB_MODULE(_triton, m) {
|
||||
|
||||
m.def("get_serialized_metadata",
|
||||
ValueOrThrowWrapper(
|
||||
[](std::string_view opaque) -> absl::StatusOr<nb::bytes> {
|
||||
[](nb::bytes opaque) -> absl::StatusOr<nb::bytes> {
|
||||
JAX_ASSIGN_OR_RETURN(
|
||||
std::string metadata,
|
||||
GetTritonKernelCallSerializedMetadata(opaque));
|
||||
GetTritonKernelCallSerializedMetadata(
|
||||
absl::string_view(opaque.c_str(), opaque.size())));
|
||||
return nb::bytes(metadata.c_str(), metadata.size());
|
||||
}));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user