# Runtime vs compile time library configuration

**URL:** <https://community.konduit.ai/t/runtime-vs-compile-time-library-configuration/936>\
**Category:** Feature Request\
**Created:** [October 19, 2020, 1:15pm UTC](https://community.konduit.ai/t/runtime-vs-compile-time-library-configuration/936 "2020-10-19T13:15:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawood](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dawood](https://community.konduit.ai/u/dawood)\
**Post date:** [October 19, 2020, 1:15pm UTC](https://community.konduit.ai/t/runtime-vs-compile-time-library-configuration/936/1 "2020-10-19T13:15:13Z")

</div>

Currently the set of libraries used for AVX2, AVX512, GPU, etc must be defined at compile time. This requires us to have separate builds for each runtime environments. Is there a way or perhaps any work on making this a runtime configurable setting?

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [October 21, 2020, 1:02am UTC](https://community.konduit.ai/t/runtime-vs-compile-time-library-configuration/936/2 "2020-10-21T01:02:44Z")

</div>

> [@dawood](#):
>
> nvironments. Is there a way or perhaps any work on making this a runtime configurable setting?

@dawood actually no, because it involves pre compiled c++ binaries. You would make the binary sizes bigger by having different versions of it.

@saudet could chip in here but what you’re asking for is just now how code works.  
No compiled code is that dynamic.

---

<div class="post-metadata">

**Author:** ![saudet](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/saudet/32/69_2.png) [@saudet](https://community.konduit.ai/u/saudet)\
**Post date:** [October 21, 2020, 1:58am UTC](https://community.konduit.ai/t/runtime-vs-compile-time-library-configuration/936/3 "2020-10-21T01:58:48Z")

</div>

Yes, it’s possible to use cpu\_features for this: [ND4J: Native library AVX validation and logging (usability) · Issue #7834 · eclipse/deeplearning4j · GitHub](https://github.com/eclipse/deeplearning4j/issues/7834#issuecomment-498170278)
