elixir-nx / xla

Pre-compiled XLA extension
Apache License 2.0
87 stars 20 forks source link

Does libxla_extension.so provide definitions for all the declarations in include/? #12

Closed joelberkeley closed 2 years ago

joelberkeley commented 2 years ago

I'm new to C++ compilation, and wanted to check I've understood what this package provides. For every declaration in the header files in the include/ directory in the released packages, is there a corresponding definition in the libxla_extension.so shared library?

seanmor5 commented 2 years ago

There should be: https://github.com/elixir-nx/xla/blob/main/extension/BUILD#L67

This line uses the dependencies specified and gets every header referenced for dependencies and nested dependencies. It's possible there might be some discrepancies though

joelberkeley commented 2 years ago

OK. I'm trying to use double_conversion::Bignum to check my setup works, and it's not finding the constructor or a number of members. Do you happen to know if there are definitions for that class? Don't go out of your way to check, I'm just wondering if you know off hand.

joelberkeley commented 2 years ago

I'm able to call into util/utf.h, which suggests my setup is largely correct, and that either Bignum is missing or there is something to do with classes or namespaces that I've missed

joelberkeley commented 2 years ago

Fixed it. I was compiling it wrong. Thanks for your help