mirror of
https://github.com/ROCm/jax.git
synced 2025-04-17 12:26:07 +00:00

As we've established (sigh) we can't pass in TMA descriptors through global memory. The current workaround was to use constant memory instead, but this raises a number of potential concurrency issues. So, instead, we use the freshly added support for grid_constant parameters in upstream LLVM to pass the descriptors as kernel arguments. This seems to work fine and should in fact have lower overheads than both previous methods. PiperOrigin-RevId: 648744363
29 lines
946 B
C++
29 lines
946 B
C++
/* Copyright 2024 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.
|
|
==============================================================================*/
|
|
|
|
#ifndef JAXLIB_MOSAIC_GPU_CONVERT_GPU_TO_LLVM_H_
|
|
#define JAXLIB_MOSAIC_GPU_CONVERT_GPU_TO_LLVM_H_
|
|
|
|
namespace mosaic {
|
|
namespace gpu {
|
|
|
|
void registerByvalInsertionPass();
|
|
void registerConvertGpuToLLVMPass();
|
|
|
|
} // namespace gpu
|
|
} // namespace mosaic
|
|
|
|
#endif // JAXLIB_MOSAIC_GPU_CONVERT_GPU_TO_LLVM_H_
|