Skip to content

Instantly share code, notes, and snippets.

View BenHamm's full-sized avatar

Ben Hamm BenHamm

  • OctoML
  • Seattle, WA
View GitHub Profile

FAKE TensorRT-Cloud PyTorch Sweep Quickstart Guide

This guide will walk you through using TensorRT-Cloud to perform performance sweeping with the TRT LLM PyTorch backend.

--> THIS GUIDE IS PSEUDOCODE AND JUST A PRODUCT MANAGER'S SUGGESTION. WE HAVE NOT YET BUILT THIS FEATURE <---

Overview

Unlike the C++ backend which uses ahead-of-time (AoT) compilation, TRT LLM PyTorch uses just-in-time (JIT) compilation. This means we'll be configuring runtime parameters rather than build parameters for our performance sweep.

import speech_recognition as sr
from text_to_speech import text_to_speech #a different module, but you can guess what it does
import pygame
pygame.mixer.init()
def capture_speech():
r = sr.Recognizer()
with sr.Microphone() as source: # use the default microphone as the audio source
pygame.mixer.Sound("open_mic.wav").play() #play a prompt sound so that the user knows that they can speak
import speech_recognition as sr
import time
import sys
sys.stdout = open('/dev/null', 'w')
from text_to_speech import text_to_speech
import pygame
sys.stdout = sys.__stdout__
pygame.mixer.init()
@BenHamm
BenHamm / ConVarThread.py
Last active March 24, 2019 22:27
Threading condition vars
import threading
import time
condition = threading.Condition()
def lock_door():
global condition
while True:
print("Lock Thread: Door lock armed")