1
0
mirror of https://github.com/ROCm/jax.git synced 2025-04-18 04:46:06 +00:00
George Necula 9f797990b5 Remove old backward compatibility mode for old PRGN custom call on GPU
The backend support for the new custom call was added on June 28th, 2024 ().

PiperOrigin-RevId: 723077990
2025-02-04 07:34:52 -08:00

40 lines
1.1 KiB
C++

/* Copyright 2019 The JAX Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "nanobind/nanobind.h"
#include "jaxlib/gpu/prng_kernels.h"
#include "jaxlib/kernel_nanobind_helpers.h"
namespace jax {
namespace JAX_GPU_NAMESPACE {
namespace {
namespace nb = nanobind;
nb::dict Registrations() {
nb::dict dict;
dict[JAX_GPU_PREFIX "_threefry2x32_ffi"] =
EncapsulateFfiHandler(ThreeFry2x32Ffi);
return dict;
}
NB_MODULE(_prng, m) {
m.def("registrations", &Registrations);
}
} // namespace
} // namespace JAX_GPU_NAMESPACE
} // namespace jax