Skip to content

Commit

Permalink
fix(library): only compile CUDA extension on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo authored Jan 6, 2025
1 parent 66dca87 commit c173d2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/quanto/library/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import platform
import torch

from .cpp import *
from .extension import *


if torch.cuda.is_available():
if torch.cuda.is_available() and platform.system() == "Linux":
if torch.version.cuda:
from .cuda import *
elif torch.version.hip:
Expand Down

0 comments on commit c173d2b

Please sign in to comment.