# Run code for mixed compute capability cards

**URL:** <https://forums.developer.nvidia.com/t/run-code-for-mixed-compute-capability-cards/7250>\
**Category:** CUDA Programming and Performance\
**Created:** [January 15, 2009, 2:32am UTC](https://forums.developer.nvidia.com/t/run-code-for-mixed-compute-capability-cards/7250 "2009-01-15T02:32:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CUDA\_Moose](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@CUDA\_Moose](https://forums.developer.nvidia.com/u/CUDA_Moose)\
**Post date:** [January 15, 2009, 2:32am UTC](https://forums.developer.nvidia.com/t/run-code-for-mixed-compute-capability-cards/7250/1 "2009-01-15T02:32:49Z")

</div>

Is there a way to compile/run code for mixed compute capabilities? Like can I have a 1.1 kernel running on a 1.1 card, and a 1.0 kernel running on a second card, or can the compiler not handle that?

---

<div class="post-metadata">

**Author:** ![icegibbon](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@icegibbon](https://forums.developer.nvidia.com/u/icegibbon)\
**Post date:** [January 15, 2009, 2:47am UTC](https://forums.developer.nvidia.com/t/run-code-for-mixed-compute-capability-cards/7250/2 "2009-01-15T02:47:17Z")

</div>

> [@](#):
>
> Is there a way to compile/run code for mixed compute capabilities? Like can I have a 1.1 kernel running on a 1.1 card, and a 1.0 kernel running on a second card, or can the compiler not handle that?

There is a section on this in the programming manual. This is what I used when I compiled the kernels.

-gencode arch=compute\_10,code=sm\_10 \

-gencode arch=compute\_11,code=sm\_11 \

-gencode arch=compute\_12,code=sm\_12 \

-gencode arch=compute\_13,code=sm\_13

This compile the kernels 4 different ways and choose the best one at runtime.
