Open Kovax007 opened 3 weeks ago
And if I change the NVCC compiler to CLANG then I get a different error:
The issue with __float128
has been fixed in the recent clang. https://github.com/llvm/llvm-project/pull/83918
I managed to make progress and compile the pjrt c plugin. In order to make it work, first I had to compile clang-19 and set the xla_configure.bazelrc to point the linkopt ld path to the builded lld linker.
I had to set the hermetic cuda enviroment to 12.5.1 build:cuda --repo_env=HERMETIC_CUDA_VERSION="12.5.1" (Does not work with 12.6.0) After that it still failed to compile, as protocolbuffer udp.c module had one define that is c++23: upb_alignof my edit:
#define upb_alignof(type) \
((size_t)(&((struct { char c; type d; }*)0)->d))
upb_arena *upb_arena_init(void *mem, size_t n, upb_alloc *alloc) {
const size_t first_block_overhead = sizeof(upb_arena) + sizeof(mem_block);
upb_arena *a;
bool owned = false;
/* Round block size down to alignof(*a) since we will allocate the arena
* itself at the end. */
{
const size_t align = upb_alignof(upb_arena);
n = (n / align) * align; // Round down to nearest multiple of align
}
if (n < first_block_overhead) {
/* We need to malloc the initial block. */
n = first_block_overhead + 256;
owned = true;
if (!alloc || !(mem = upb_malloc(alloc, n))) {
return NULL;
}
}
a = (upb_arena *)((char*)mem + n - sizeof(*a));
n -= sizeof(*a);
a->alloc.func = &upb_arena_doalloc;
a->block_alloc = &upb_alloc_global;
a->bytes_allocated = 0;
a->next_block_size = 256;
a->max_block_size = 16384;
a->cleanup_head = NULL;
a->block_head = NULL;
a->block_alloc = alloc;
upb_arena_addblock(a, mem, n, owned);
return a;
}
#undef upb_alignof
Still failed, but now pointing to the external cutlass library matrix.h where m.set_slice3x3 had to be fixed to m.set_slice_3x3. (missing underscore)
After this above it worked.
Hi!
I am having trouble compiling the pjrt c plugin on Archlinux.
Here is the configuration command I am using:
python ./configure.py --backend CUDA --os LINUX --host_compiler CLANG --cuda_compiler NVCC --cudnn_version=9.2.1 --cuda_compute_capabilities=8.9
And the build command:
bazelisk build -c opt //xla/pjrt/c:pjrt_c_api_gpu_plugin.so
error message:
And if I change the NVCC compiler to CLANG then I get a different error: