fixed : tf call cuda
This commit is contained in:
@@ -763,6 +763,14 @@ def create_tpu_strategy():
|
||||
|
||||
print("🔍 Detecting TPU environment...")
|
||||
|
||||
# Disable GPU to avoid CUDA conflicts in TPU environment
|
||||
try:
|
||||
print("🚫 Disabling GPU to prevent CUDA conflicts...")
|
||||
tf.config.set_visible_devices([], 'GPU')
|
||||
print("✅ GPU disabled successfully")
|
||||
except Exception as e:
|
||||
print(f"⚠️ Warning: Could not disable GPU: {e}")
|
||||
|
||||
# Check for various TPU environment variables
|
||||
tpu_address = None
|
||||
tpu_name = None
|
||||
|
Reference in New Issue
Block a user