*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 8eb49752 authored by Muck, Katrin's avatar Muck, Katrin
Browse files

added tensorflow cuda example

parent 8eccf5f3
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
##############################################################################
# User Request:
# - allocate single gpu node
# - run python script
#
# Provided Allocation:
# - 1 exclusive gpu node
# - 16 physical cores / 32 logical cores
# - 256 GB memory
#
# VSC policy:
# - '--nodes' flag set -> exclusive node allocation
# - '--ntasks-per-node' & '--ntasks' implicitly set to 16
#
# Accounting:
# - 1x 16 core hours / hour
##############################################################################
#SBATCH --partition=zen2_0256_a40x2
#SBATCH --qos=zen2_0256_a40x2
#SBATCH --gres=gpu:2
# optionally activate a conda or python environment
module load miniconda3
eval "$(conda shell.bash hook)"
conda activate tensorflow-cuda
# load matching cuda module
module load cuda/11.8.0-gcc-12.2.0-knnuyxt
# run python code
python tensorflow-test.py
name: tensorflow-cuda
channels:
- conda-forge
- bioconda
- nvidia
- defaults
dependencies:
- python=3.11
- tensorflow=2.13.*=cuda118*
- keras
- nccl
- cudatoolkit=11.8*
- cudnn
- pip
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
print("Is built with CUDA: ", tf.test.is_built_with_cuda())
print("Build Info: ", tf.sysconfig.get_build_info())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment