Skip to content

Commit a2e9c92

Browse files
committed
Define Py_LIMITED_API in driver.c
1 parent bde540f commit a2e9c92

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

third_party/nvidia/backend/driver.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <stdbool.h>
1111
#define PY_SSIZE_T_CLEAN
12+
#define Py_LIMITED_API 0x03090000
1213
#include <Python.h>
1314
// #include <stdatomic.h>
1415

third_party/nvidia/backend/driver.py

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ def format_of(ty):
179179
src = f"""
180180
#include \"cuda.h\"
181181
#include <stdbool.h>
182+
#define PY_SSIZE_T_CLEAN
183+
#define Py_LIMITED_API 0x03090000
182184
#include <Python.h>
183185
184186
#ifndef _WIN32

0 commit comments

Comments
 (0)