Windows 10: How can I tell what python script is using my GPU?

Discus and support How can I tell what python script is using my GPU? in Windows 10 Software and Apps to solve the problem; I am using Stable Diffusion ComfyUI with a RTX 3060 TI 8gig VRAM. There are times when the program stops working, however, in task manager, I will... Discussion in 'Windows 10 Software and Apps' started by John Isdell - Atmosera, Mar 12, 2024.

  1. How can I tell what python script is using my GPU?


    I am using Stable Diffusion ComfyUI with a RTX 3060 TI 8gig VRAM. There are times when the program stops working, however, in task manager, I will still see the dedicated RAM taken up, and hear the fans running very fast.I then try to end all programs associated with python via task manager, but the fans still work hard and the VRAM is full. I have tried using Process explorer to find and kill anything running, that does not work. I am forced to restart the PC. If I do not restart the PC on my own, the system will restart and give a minidump that shows NVLDDMKM.sys had an unknown failure.

    :)
     
    John Isdell - Atmosera, Mar 12, 2024
    #1

  2. Simple Python Scripts

    Hey exodusprime1337,
    Just got in from shoveling snow *Frown How can I tell what python script is using my GPU? :(

    I'm all for suggesting Linux to people, but...
    I've also learned to keep my variables to a minimum.
    What I'm saying is, when learning something new,
    Python in this case, you don't want to add Linux and the
    shell into the mix as debugging is harder with 2 unknowns.

    Stick with your tried and true environment when experimenting
    w/ Python and when you have time to focus on Linux only
    start messing w/ shell scripting, perl and tcl/tk.
    Then you'll realize that you can do everything on Linux.

    For now just remove my she-bang line Code: #!/usr/bin/python[/quote] as it's only function is to tell the Linux kernel what interpreter to use.

    I'll have another script for you tonight *Smile How can I tell what python script is using my GPU? :)
     
    regexorcist, Mar 12, 2024
    #2
  3. Simple Python Scripts

    Before we post any more scripts, I'd like to take
    a step back and go over the basic help function
    within the Python interactive console.
    (mine is on linux, not sure if the Windows version is exactly the same) *Confused How can I tell what python script is using my GPU? :confused:

    Here I start the Python console, it tells me what
    version I'm using and gives me a >>> prompt


    How can I tell what python script is using my GPU? [​IMG]


    Now I use the HELP function to view all the installed modules/libraries
    Code: help("modules")[/quote]
    How can I tell what python script is using my GPU? [​IMG]



    How can I tell what python script is using my GPU? [​IMG]


    Now to see what functions are contained within a particular module,
    we simply use help again. I'll be looking at the webbrowser module
    which can be seen in the list.
    Code: help("webbrowser")[/quote]
    How can I tell what python script is using my GPU? [​IMG]



    How can I tell what python script is using my GPU? [​IMG]


    By looking into the module, I see that I want to use the open_new(url) function,
    so my command(s) will look someting like this.
    I have to import the module to use the functions.

    Code: >>> import webbrowser >>> webbrowser.open_new("TechPowerUp")[/quote] As you can see from the image, my default browser opened to
    the specified url from within Python.


    How can I tell what python script is using my GPU? [​IMG]


    Help can navigate through any module, exposing the various
    functions which I hope will make your python coding easy and fun *Big Grin How can I tell what python script is using my GPU? :D

    Now lets do some scripting. *Wink How can I tell what python script is using my GPU? ;)
     
    regexorcist, Mar 12, 2024
    #3
  4. How can I tell what python script is using my GPU?

    Simple Python Scripts

    Some Python Database Scripts

    Here are some Python Sqlite Database Scripts.

    You need the sqlite3 module installed,
    (but it's normally part of the initial Python install package)

    This first script creates the DATABASE and TABLE:

    Code: #!/usr/bin/python import sqlite3 try: #Here is where we create the database var_connection = sqlite3.connect("linux_database.db") #Now we create the cursor for access var_cursor = var_connection.cursor() #Now we create a database table var_cursor.execute('''CREATE TABLE linux_table(distro VARCHAR(15), version VARCHAR(5), type VARCHAR(10))''') var_connection.commit() var_connection.close() print "" print "linux_database DATABASE has been created" print "distro_table TABLE has been created" print "" except (ImportError, RuntimeError, TypeError, NameError): print "" print "Error, exception thrown" print ""[/quote] Image of this script running on my system:


    How can I tell what python script is using my GPU? [​IMG]



    This next script inserts pre-defined data into the newly created table.
    The pre-defined data is contained within multiple TUPLES and the
    tuples are contained within a LIST.

    Code: #!/usr/bin/python import sqlite3 try: #Here is where we connect to the database var_connection = sqlite3.connect("linux_database.db") #Now we create the cursor for access var_cursor = var_connection.cursor() var_data = [ ('Gentoo', '2010', 'rolling'), ('Arch', '2010', 'rolling'), ('Slackware', '13.0', 'fixed'), ('Fedora', '12.0', 'fixed'), ('Debian', '5.0', 'fixed'), ('Ubuntu', '9.10', 'fixed'), ('openSUSE', '11.3', 'fixed'), ('Mandriva', '2010', 'fixed'), ('Mint', '8.0', 'fixed'), ('PCLinuxOS', '2010', 'rolling'), ] var_cursor.executemany('''INSERT INTO linux_table(distro, version,type) VALUES(?, ?, ?)''', var_data) var_connection.commit() var_connection.close() print "" print "Data has been input successfully" print "" except (ImportError, RuntimeError, TypeError, NameError): print "" print "Error inputing data" print ""[/quote] Again, here is the script running on my system:


    How can I tell what python script is using my GPU? [​IMG]



    This final script sends a query to the database and displays the result.

    Code: #!/usr/bin/python import sqlite3 try: #Here is where we create the database var_connection = sqlite3.connect("linux_database.db") #Now we create the cursor for access var_cursor = var_connection.cursor() var_cursor.execute('''SELECT distro, version, type FROM linux_table ORDER BY distro''') print "" column_width = 15 for column_description in var_cursor.description: print column_description[0].ljust(column_width) , print "" print "-" * 45 var_index = range(len(var_cursor.description)) #Loop through the cursor dataset to extract data for row in var_cursor: for index in var_index: var_value = str(row[index]) print var_value.ljust(column_width) , print "" var_connection.commit() var_connection.close() print "" except (ImportError, RuntimeError, TypeError, NameError): print "" print "Error, selecting data to be displayed" print ""[/quote]
    Here is the script output:


    How can I tell what python script is using my GPU? [​IMG]



    Some basic database functions in Python.
    It's a simple into which you can build on.
    Have Fun with it!! *Wink How can I tell what python script is using my GPU? ;)
     
    regexorcist, Mar 12, 2024
    #4
Thema:

How can I tell what python script is using my GPU?

Loading...
  1. How can I tell what python script is using my GPU? - Similar Threads - tell python script

  2. How can I tell what python script is using my GPU?

    in Windows 10 Gaming
    How can I tell what python script is using my GPU?: I am using Stable Diffusion ComfyUI with a RTX 3060 TI 8gig VRAM. There are times when the program stops working, however, in task manager, I will still see the dedicated RAM taken up, and hear the fans running very fast.I then try to end all programs associated with python...
  3. can anyone tell what are these scripts running in background?

    in AntiVirus, Firewalls and System Security
    can anyone tell what are these scripts running in background?: first it was just 1 and after 5 mins i got these 2 morealso found these running with the same spam like names and on top of that i dont have chrome on my pc...
  4. can anyone tell what are these scripts running in background?

    in Windows 10 Gaming
    can anyone tell what are these scripts running in background?: first it was just 1 and after 5 mins i got these 2 morealso found these running with the same spam like names and on top of that i dont have chrome on my pc...
  5. can anyone tell what are these scripts running in background?

    in Windows 10 Software and Apps
    can anyone tell what are these scripts running in background?: first it was just 1 and after 5 mins i got these 2 morealso found these running with the same spam like names and on top of that i dont have chrome on my pc...
  6. How I can allocate full GPU to a python/anaconda ?

    in Windows 10 Gaming
    How I can allocate full GPU to a python/anaconda ?: I am having Dell Power Edge Rack server with integrated NVIDIA A40 GPU 48GB running on Windows server platform. But when i run the python program using anaconda/jupyter/jupyter-lab it allocates the fixed amount of GPU memory and does not allocating dynamically according to...
  7. How I can allocate full GPU to a python/anaconda ?

    in Windows 10 Software and Apps
    How I can allocate full GPU to a python/anaconda ?: I am having Dell Power Edge Rack server with integrated NVIDIA A40 GPU 48GB running on Windows server platform. But when i run the python program using anaconda/jupyter/jupyter-lab it allocates the fixed amount of GPU memory and does not allocating dynamically according to...
  8. How do I run this python script?

    in Windows 10 Gaming
    How do I run this python script?: https://pypi.org/project/autoeq/How do I run it? Also, what can I do to make sure that my laptop can run the script? Do i need to install any additional things or verify anything?Thanks if you can guide me....
  9. How do I run this python script?

    in Windows 10 Software and Apps
    How do I run this python script?: https://pypi.org/project/autoeq/How do I run it? Also, what can I do to make sure that my laptop can run the script? Do i need to install any additional things or verify anything?Thanks if you can guide me....
  10. How do I run this python script?

    in Windows 10 Customization
    How do I run this python script?: https://pypi.org/project/autoeq/How do I run it? Also, what can I do to make sure that my laptop can run the script? Do i need to install any additional things or verify anything?Thanks if you can guide me....