This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bisect import bisect_left | |
from subprocess import Popen, PIPE | |
from time import sleep | |
import numpy as np | |
def get_temperature(gpu=0): | |
lines = Popen(["aticonfig", "--adapter=%d" % gpu, "--od-gettemperature"], | |
stdout=PIPE).communicate()[0].split("\n") | |
lines = [xx.strip() for xx in lines if len(xx.strip()) > 0] | |
# Adapter 0 - AMD Radeon HD 6800 Series |
NewerOlder