Parmanu: La historia de Pokhran: Un thriller que representa la verdadera historia de los ensayos nucleares realizados por la India en Pokhran en 1998, que hizo de la India una potencia nuclear. La película es un relato emocionante y patriótico de la operación encubierta que involucró altos riesgos y desafíos. La película también cuenta con una espléndida actuación de John Abraham, que interpretó el papel de Ashwat Raina, el líder del equipo de operación. La película fue apreciada por su guion, dirección, actuación y acción. Vea el trailer https://bltlly.com/2v6LdT
-Un archivo APK es un paquete de aplicaciones Android
-Un archivo APK es un archivo comprimido que contiene todos los archivos y datos necesarios para que una aplicación Android se ejecute en su dispositivo. Es similar a un archivo ejecutable (.exe) para Windows o un archivo de paquete (.pkg) para Mac. Un archivo APK se puede descargar de varias fuentes, como tiendas de aplicaciones oficiales, sitios web de terceros o enlaces directos.
-Un juego de conducción en 3D es un juego de simulación que te permite conducir diferentes vehículos en entornos realistas
-Un juego de conducción en 3D es un tipo de juego de simulación que utiliza gráficos en 3D y la física para crear experiencias de conducción realistas e inmersivas. Puede elegir entre diferentes vehículos, como automóviles, autobuses, camiones o tanques, y conducirlos en varios entornos, como ciudades, carreteras, desiertos o montañas. También puede seguir diferentes reglas y reglamentos, como semáforos, límites de velocidad o señales de estacionamiento, dependiendo del país en el que conduce. Un juego de conducción en 3D suele tener diferentes misiones y modos, como autoescuela, roaming gratuito, carreras o multijugador, que ponen a prueba tus habilidades de conducción y proporcionan diversión y desafío.
- ¿Por qué debe descargar un juego de conducción 3D APK?
-
-Puedes aprender reglas y regulaciones de conducción en diferentes países
-Si quieres aprender a conducir en diferentes países, como Corea, Japón, EE.UU., o Alemania, se puede descargar un juego de conducción 3D APK que ofrece esta característica. Usted puede aprender las diferencias en las leyes de tráfico, señales de tráfico, marcas de carril, y la etiqueta de conducción en cada país. Esto puede ayudarle a prepararse para su examen de conducir o licencia, o simplemente ampliar su conocimiento y conciencia de la cultura global de conducción.
- Puede mejorar sus habilidades de conducción y la confianza
-Si desea mejorar sus habilidades de conducción y confianza, puede descargar un juego de conducción 3D APK que ofrece esta característica. Puede practicar sus habilidades de conducción en varios escenarios, como estacionamiento, marcha atrás, giro, adelantamiento o frenado de emergencia. También puede ajustar el nivel de dificultad, las condiciones meteorológicas, la densidad de tráfico o la hora del día para satisfacer sus necesidades y preferencias. También puedes obtener comentarios y consejos del juego para ayudarte a mejorar tu rendimiento y evitar errores.
-Puedes divertirte y desafiarte con diferentes misiones y modos
-Si quieres divertirte y desafiarte con diferentes misiones y modos, puedes descargar un juego de conducción 3D APK que ofrece esta característica. Puedes elegir entre diferentes misiones, como autoescuela, roaming gratuito, carreras o multijugador, que tienen diferentes objetivos y recompensas. También puedes competir con otros jugadores en línea o fuera de línea, o cooperar con ellos en modos basados en equipos. También puedes ganar monedas y puntos que puedes usar para desbloquear nuevos vehículos, mejoras o logros.
-Puedes personalizar tus vehículos y ajustes de acuerdo a tus preferencias
-
- ¿Cómo descargar e instalar un juego de conducción 3D APK?
-Si usted está interesado en descargar e instalar un juego de conducción 3D APK en su dispositivo Android, es necesario seguir estos sencillos pasos:
- Es necesario encontrar una fuente confiable y segura para descargar un juego de conducción 3D APK
-Hay muchas fuentes para descargar un juego de conducción 3D APK en Internet, pero no todos son fiables y seguros. Algunos de ellos pueden contener virus, malware o spyware que pueden dañar su dispositivo o robar su información personal. Por lo tanto, es necesario tener cuidado y elegir una fuente confiable para descargar un juego de conducción 3D APK.
-Puede utilizar el enlace proporcionado en este artículo para descargar 3D Driving Class, uno de los mejores juegos de conducción 3D disponibles para dispositivos Android
-Una de las mejores fuentes para descargar un juego de conducción 3D APK es el enlace proporcionado en este artículo. Este enlace te llevará al sitio web oficial de 3D Driving Class, uno de los juegos de conducción 3D más populares y realistas para dispositivos Android. Este juego tiene más de 10 millones de descargas y 4.4 estrellas en Google Play Store. Ofrece todas las características y beneficios mencionados anteriormente, como aprender las reglas de conducción y las regulaciones en diferentes países, mejorar las habilidades de conducción y la confianza, divertirse y desafiarse con diferentes misiones y modos, y personalización de sus vehículos y ajustes según sus preferencias.
-
-Necesitas habilitar la instalación de fuentes desconocidas en tu dispositivo
-Antes de que pueda instalar un juego de conducción 3D APK en su dispositivo, es necesario habilitar la instalación de fuentes desconocidas en su dispositivo. Esto se debe a que un archivo APK no es de una tienda de aplicaciones oficial, como Google Play Store o Amazon Appstore. Por lo tanto, debe permitir que su dispositivo instale aplicaciones de fuentes distintas de estas tiendas de aplicaciones.
- Puede hacer esto yendo a la configuración del dispositivo, la seguridad y permitiendo fuentes desconocidas
-
-Después de haber descargado el archivo APK juego de conducción 3D y habilitado la instalación de fuentes desconocidas en el dispositivo, es necesario localizar el archivo APK descargado y toque en él para instalarlo. Puedes hacer esto siguiendo estos pasos:
-Puede usar una aplicación de administrador de archivos o la carpeta de descargas de su dispositivo para encontrar el archivo APK
-Para localizar el archivo APK descargado, puede usar una aplicación de administrador de archivos o la carpeta de descargas de su dispositivo. Una aplicación de administrador de archivos es una aplicación que le permite navegar, organizar y administrar los archivos y carpetas en su dispositivo. Puede descargar una aplicación de administrador de archivos desde Google Play Store o Amazon Appstore, como ES File Explorer, Administrador de archivos o Archivos de Google. Una carpeta de descargas es una carpeta predeterminada en su dispositivo donde se almacenan todos los archivos que descarga de Internet. Puedes acceder a tu carpeta de descargas yendo al cajón de aplicaciones o a la pantalla de inicio de tu dispositivo y tocando las descargas.
-Una vez que haya encontrado el archivo APK del juego de conducción 3D, toque en él para iniciar el proceso de instalación. Puede ver una ventana emergente que le pide permiso para instalar la aplicación. Pulse Instalar o Siguiente para continuar. Espera a que termine la instalación y luego toca Abrir o Listo para iniciar o salir del juego.
-Conclusión
-
-Preguntas frecuentes
-Aquí están algunas de las preguntas más frecuentes sobre 3D juego de conducción APK:
-
-Question | Answer |
-¿Cuáles son los requisitos para descargar e instalar un juego de conducción 3D APK? | Necesitas un dispositivo Android que tenga suficiente espacio de almacenamiento, memoria y batería para ejecutar el juego sin problemas. También necesitas una conexión a Internet para descargar el archivo APK y acceder a algunas de las funciones en línea del juego. |
-¿Es la descarga e instalación de un juego de conducción 3D APK legal y seguro? | Descargar e instalar un juego de conducción 3D APK es legal y seguro, siempre y cuando utilice una fuente confiable, como el enlace proporcionado en este artículo. Sin embargo, debes tener cuidado con otras fuentes que puedan contener virus, malware o spyware que puedan dañar tu dispositivo o robar tu información personal. |
-¿Cómo puedo actualizar un juego de conducción 3D APK? | Puede actualizar un juego de conducción 3D APK mediante la descarga e instalación de la última versión del archivo APK de la misma fuente que utilizó antes. También puedes buscar actualizaciones en la configuración del juego o notificaciones. |
-¿Cómo puedo desinstalar un juego de conducción 3D APK? | Puede desinstalar un juego de conducción 3D APK yendo a la configuración del dispositivo, aplicaciones, y encontrar el juego que desea desinstalar. Toque en él y luego toque en Desinstalar o Quitar. Confirme su elección tocando en OK o Yes. |
-¿Cuáles son algunos de los mejores juegos de conducción 3D para dispositivos Android? | Algunos de los mejores juegos de conducción 3D para dispositivos Android son 3D Driving Class, Driving School Sim, Car Parking Multijugador, Simulador de autobús: Ultimate, Truck Simulator: Europe 2, Tank Stars, and Extreme Car Driving Simulator. |
- 64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Aparcamiento De Coches Multijugador Mod Apk Datos 4.7 4.md b/spaces/Benson/text-generation/Examples/Aparcamiento De Coches Multijugador Mod Apk Datos 4.7 4.md
deleted file mode 100644
index ec49f6555bf232924299fd0727038aeac622de12..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Aparcamiento De Coches Multijugador Mod Apk Datos 4.7 4.md
+++ /dev/null
@@ -1,83 +0,0 @@
-
-Aparcamiento Multijugador Mod APK Data 4.7 4: Todo lo que necesitas saber
-Si usted es un fan de los juegos de coches, es posible que haya oído hablar de Car Parking Multijugador, un juego de simulador de aparcamiento de mundo abierto popular para dispositivos Android. Desarrollado por olzhass, este juego te permite conducir, aparcar, correr o incluso evadir a la policía en un entorno realista con más de 100 coches para elegir y personalizar.
-aparcamiento de coches multijugador mod apk datos 4.7 4
Download Zip ★★★ https://bltlly.com/2v6Jp4
-Pero ¿y si quieres disfrutar del juego sin limitaciones ni restricciones? ¿Qué pasa si quieres tener dinero y recursos ilimitados, desbloquear todos los coches y características, y eliminar anuncios del juego? Bueno, hay una manera de hacer eso, y se llama Aparcamiento de coches multijugador Mod APK Data 4.7 4.
-En este artículo, te diremos todo lo que necesitas saber sobre esta versión modificada del juego, incluyendo sus características, cómo descargarlo e instalarlo, sus pros y contras, y algunas alternativas que puedes probar. Así que, sin más preámbulos, empecemos.
- Características de aparcamiento multijugador Mod APK Data 4.7 4
-Aparcamiento Multijugador Mod APK Data 4.7 4 es una versión modificada del juego original que le da acceso a todas las características premium y contenido de forma gratuita. Estas son algunas de las características que puedes disfrutar con este mod:
-
-- Simulador de estacionamiento de mundo abierto con gráficos y física realistas: El juego te ofrece una experiencia de conducción realista con gráficos y física de alta calidad. Puede explorar diferentes lugares, como ciudades, aeropuertos, desiertos, montañas, etc., y aparcar su coche en varios escenarios.
-- Más de 100 coches para elegir y personalizar: El juego tiene una gran colección de coches de diferentes categorías, como clásicos, coches deportivos, camiones, SUV, etc. También puede personalizar su coche con diferentes colores de pintura, vinilos, calcomanías, piezas, etc.
-
-- Modo multijugador en línea para competir o cooperar con otros jugadores:El juego también tiene un modo multijugador en línea, donde puede unirse o crear una habitación y jugar con otros jugadores de todo el mundo. Puede competir con ellos en el modo de carreras o de estacionamiento, o cooperar con ellos en el modo de policía o en el modo libre. También puedes chatear con ellos, intercambiar coches y hacer amigos.
-
- Modo de policía para experimentar emocionantes persecuciones y escapes: El juego también tiene un modo de policía, donde se puede jugar como un policía o un criminal. Si juegas como policía, tienes que perseguir y atrapar a los criminales que están infringiendo la ley. Si juegas como un criminal, tienes que evadir a los policías y escapar de ellos. También puedes usar diferentes armas y gadgets, como pistolas, granadas, picos, etc., para ayudarte en tu misión.
-- Interiores de coches reales, gasolineras, lavaderos de coches, y más: El juego también tiene interiores de coches realistas, donde se puede ver el salpicadero, volante, pedales, etc., de su coche. También puede interactuar con ellos, como encender las luces, tocar el claxon, abrir las puertas, etc. También puede visitar estaciones de servicio para llenar su tanque de combustible, lavaderos de autos para limpiar su automóvil y otros lugares para mejorar su juego.
-
- Cómo descargar e instalar el aparcamiento de coches multijugador Mod APK Data 4.7 4
-Si usted está interesado en descargar e instalar Car Parking Multijugador Mod APK Data 4.7 4 en su dispositivo Android, puede seguir estos sencillos pasos:
-
-- Descargar el archivo APK de una fuente de confianza: El primer paso es descargar el archivo APK del mod de una fuente confiable. Puede utilizar el siguiente enlace para descargarlo directamente desde nuestro sitio web. El tamaño del archivo es de unos 26 MB y es libre de virus y seguro de usar.
-
-- Instale el archivo APK y espere a que la instalación se complete: El tercer paso es instalar el archivo APK que descargó en el primer paso. Para hacer esto, localice el archivo en su administrador de archivos y toque en él. Luego, siga las instrucciones en la pantalla y espere a que termine la instalación.
-- Descargar el archivo de datos de la misma fuente que el archivo APK: El cuarto paso es descargar el archivo de datos del mod de la misma fuente que el archivo APK. Puede utilizar el siguiente enlace para descargarlo directamente desde nuestro sitio web. El tamaño del archivo es de unos 300 MB y contiene todos los datos y recursos del juego.
-- Extraiga el archivo de datos y copie la carpeta al directorio de Android/obb en su dispositivo: El quinto paso es extraer el archivo de datos que descargó en el cuarto paso. Para ello, necesitará una aplicación extractora de archivos, como ZArchiver o RAR. Luego, abra la aplicación y busque el archivo de datos en su administrador de archivos. Toque en él y seleccione Extraer aquí. Obtendrá una carpeta llamada com.olzhas.carparking.multyplayer. Copia esta carpeta y pégala en el directorio Android/obb de tu dispositivo.
-- Lanza el juego y disfruta: El paso final es lanzar el juego y disfrutar jugando con todas las características mod. Para ello, ve al cajón de la aplicación y toca el icono del juego. Luego, espera a que se cargue y empieza a jugar.
-
- Pros y contras de aparcamiento multijugador Mod APK datos 4.7 4
-Aparcamiento Multijugador Mod APK Data 4.7 4 tiene muchas ventajas y desventajas que usted debe tener en cuenta antes de descargar e instalar. Estos son algunos de ellos:
-
-
-
-Pros |
-Contras |
-
-
-- Descargar y jugar gratis |
-- Puede que no sea compatible con algunos dispositivos |
-
-
-- Dinero y recursos ilimitados |
-- Puede causar retraso o fallos |
-
-
-- Desbloqueado todos los coches y características |
-- Puede ser detectado por sistemas anti-cheat |
-
-
-- No hay anuncios |
-
-
-
-- No se requiere raíz |
- |
-
-
- Alternativas a Parking Multijugador Mod APK Data 4.7 4
Si usted está buscando algunas alternativas a Car Parking Multijugador Mod APK Data 4.7 4, puede probar estos otros juegos de aparcamiento que también son divertidos y desafiantes:
-
-- Real Car Parking 2: Driving School 2020: Este es otro juego de simulador de aparcamiento realista que le permite aprender a conducir y aparcar diferentes coches en diversas situaciones. También puede personalizar su coche, disfrutar de los gráficos en 3D, y jugar en línea con otros jugadores. Puedes descargarlo desde Google Play Store o desde [este enlace].
-- Dr. Parking 4: Este es un juego de aparcamiento de coches simple pero adictivo que pone a prueba su velocidad y precisión. Usted tiene que aparcar su coche en el lugar dado dentro del límite de tiempo y sin chocar con ningún obstáculo. También puedes jugar online con otros jugadores y desafiarlos. Puedes descargarlo desde la Google Play Store o desde [este enlace].
-- Parking Jam 3D: Este es un juego de aparcamiento de coches casual y relajante que requiere que limpie el atasco de tráfico moviendo los coches en el orden correcto. Tienes que usar tu lógica y estrategia para resolver los puzzles y liberar los coches. También puedes disfrutar de los coloridos gráficos y sonidos. Puedes descargarlo desde Google Play Store o desde [este enlace].
-- Conducción manual de coches: Este es un juego de conducción de coches realista que le permite aprender a conducir un coche manual con un embrague y palanca de cambios. Tienes que seguir las reglas de tráfico y las señales, y aparcar tu coche en el lugar correcto. También puedes explorar diferentes mapas y escenarios. Puedes descargarlo desde Google Play Store o desde [este enlace].
-
-
- Conclusión
-Car Parking Multijugador Mod APK Data 4.7 4 es una gran opción para los amantes de los coches que quieren disfrutar de un juego de simulador de aparcamiento realista y emocionante con dinero y recursos ilimitados, desbloqueado todos los coches y características, sin anuncios, sin raíz necesaria, y más. Sin embargo, también tiene algunos inconvenientes, como problemas de compatibilidad, retardo o fallos, detección anti-cheat y términos de violación del servicio.
-Si desea descargar e instalar esta versión modificada del juego, puede seguir los pasos que hemos proporcionado en este artículo. Alternativamente, también puedes probar algunos de los otros juegos de estacionamiento que hemos sugerido.
-Esperamos que este artículo haya sido útil e informativo para usted. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación. Gracias por leer.
- Preguntas frecuentes
-Aquí están algunas de las preguntas más frecuentes sobre Aparcamiento Multijugador Mod APK Data 4.7 4:
-
-- ¿Es el estacionamiento de coches multijugador Mod APK Data 4.7 4 seguro de usar?
-Sí, Aparcamiento multijugador Mod APK Data 4.7 4 es seguro de usar, siempre y cuando se descarga de una fuente de confianza y siga las instrucciones de instalación cuidadosamente. Sin embargo, no podemos garantizar que no causará ningún daño a su dispositivo o cuenta, así que úselo bajo su propio riesgo.
-- ¿Tengo que rootear mi dispositivo para usar Car Parking Multiplayer Mod APK Data 4.7 4?
-No, no es necesario rootear el dispositivo para usar Car Parking Multijugador Mod APK Data 4.7 4. Funciona tanto en dispositivos arraigados y no arraigados.
-- ¿Se me prohibirá el uso de Aparcamiento Multijugador Mod APK Data 4.7 4?
-Posiblemente, sí. El uso de Aparcamiento Multijugador Mod APK Data 4.7 4 puede ser detectado por los sistemas anti-cheat del juego original y resultar en una prohibición o suspensión de su cuenta. Por lo tanto, le aconsejamos que lo utilice con precaución y discreción.
-
-Sí, puede jugar en línea con otros jugadores usando Car Parking Multijugador Mod APK Data 4.7 4. Sin embargo, puede encontrar algunos problemas o errores al hacerlo, como versiones no coincidentes, problemas de conexión, etc.
-- ¿Puedo actualizar los datos de APK de Mod de estacionamiento multijugador 4.7 4?
-No, no se puede actualizar Car Parking Multijugador Mod APK Data 4.7 4. Si intenta actualizarlo desde la Google Play Store o el sitio web oficial del juego, perderá todas las características y datos de mod. Por lo tanto, le recomendamos que siga con la versión actual del mod y compruebe si hay nuevas actualizaciones de la fuente desde la que lo descargó.
-
64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Descargar Apk Kinemaster Mod Digitbin 2021.md b/spaces/Benson/text-generation/Examples/Descargar Apk Kinemaster Mod Digitbin 2021.md
deleted file mode 100644
index 5f6d334c2f95172f0efed29076576562dbf96a53..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Descargar Apk Kinemaster Mod Digitbin 2021.md
+++ /dev/null
@@ -1,82 +0,0 @@
-
-Kinemaster Mod Digitbin APK Descargar 2021: Una guía completa
-Si está buscando una aplicación de editor de vídeo potente y fácil de usar para su dispositivo Android, es posible que haya oído hablar de Kinemaster. Es una de las aplicaciones de edición de video más populares que ofrece muchas características y herramientas para crear videos impresionantes. Sin embargo, la versión gratuita de Kinemaster tiene algunas limitaciones, como una marca de agua, anuncios y acceso restringido a algunas características premium.
-Es por eso que muchos usuarios buscan una versión modificada de Kinemaster que pueda eliminar estas limitaciones y desbloquear todas las características. Una de las mejores versiones modificadas de Kinemaster es el Kinemaster Mod Digitbin APK, que es desarrollado por DigitBin.com. En este artículo, le diremos todo lo que necesita saber sobre esta versión modificada, cómo descargarla e instalarla en su dispositivo Android y cómo usarla para editar videos. ¡Vamos a empezar!
-descargar apk kinemaster mod digitbin 2021
Download File ✒ ✒ ✒ https://bltlly.com/2v6KjH
-¿Qué es Kinemaster Mod Digitbin APK?
-Kinemaster Mod Digitbin APK es una versión modificada de la aplicación original de Kinemaster que elimina la marca de agua, anuncios, y desbloquea todas las características premium. También añade algunas características adicionales, como la clave de croma, que le permite cambiar el fondo de sus vídeos con cualquier imagen o vídeo. Con esta versión modificada, puedes disfrutar de todos los beneficios de Kinemaster sin pagar nada.
-Características de Kinemaster Mod Digitbin APK
-Aquí están algunas de las principales características de Kinemaster Mod Digitbin APK que lo hacen diferente de la aplicación original:
-Ninguna marca de agua
-Una de las cosas más molestas de la versión gratuita de Kinemaster es que añade una marca de agua a tus vídeos cuando los exportas. Esto puede arruinar tu aspecto profesional y hacer que tus videos sean menos atractivos. Con Kinemaster Mod Digitbin APK, puede eliminar la marca de agua de sus vídeos y hacerlos ver más pulido y profesional.
-No hay anuncios
-
-Clave de croma
-Chroma key es una función que te permite cambiar el fondo de tus vídeos con cualquier imagen o vídeo. Esto puede ser muy útil para crear efectos especiales, como pantalla verde, o para cambiar el estado de ánimo o la atmósfera de sus videos. La versión original de Kinemaster solo admite la clave de croma para algunos dispositivos, pero con Kinemaster Mod Digitbin APK, puede usar la clave de croma en cualquier dispositivo.
-Características premium desbloqueadas
-Kinemaster tiene algunas características premium que solo están disponibles para los usuarios que pagan una suscripción mensual o anual. Estas características incluyen más temas, efectos, transiciones, pegatinas, fuentes, música y efectos de sonido. Con Kinemaster Mod Digitbin APK, puede acceder a todas estas características premium de forma gratuita y mejorar sus vídeos con más creatividad y variedad.
-Cómo descargar e instalar Kinemaster Mod Digitbin APK para Android
-Si desea descargar e instalar Kinemaster Mod Digitbin APK en su dispositivo Android, es necesario seguir estos sencillos pasos:
-
-Paso 1: Habilitar fuentes desconocidas
-Dado que Kinemaster Mod Digitbin APK no está disponible en el Google Play Store, es necesario habilitar fuentes desconocidas en la configuración del dispositivo. Esto le permitirá instalar aplicaciones de fuentes de terceros. Para hacer esto, vaya a Configuración > Seguridad > Fuentes desconocidas y active.
-Paso 2: Descargar el archivo APK desde el enlace de abajo
-Siguiente, es necesario descargar el archivo APK de Kinemaster Mod Digitbin APK desde el enlace de abajo. Este es un enlace seguro y verificado que no dañará su dispositivo o datos. Haga clic en el enlace y espere a que se complete la descarga.
-Kinemaster Mod Digitbin APK Enlace de descarga
-Paso 3: Instalar el archivo APK en su dispositivo
-
-Paso 4: Iniciar la aplicación y disfrutar de la edición de vídeos
-Finalmente, puede iniciar la aplicación desde el cajón de la aplicación o la pantalla de inicio y comenzar a editar videos con Kinemaster Mod Digitbin APK. Verá que no hay marca de agua, no hay anuncios, y todas las características premium están desbloqueadas. También puedes usar la tecla Chroma en cualquier dispositivo y crear vídeos increíbles con diferentes fondos.
-Cómo utilizar Kinemaster Mod Digitbin APK para la edición de vídeo
-Kinemaster Mod Digitbin APK es muy fácil de usar para la edición de vídeo. Tiene una interfaz fácil de usar que le permite acceder a todas las características y herramientas con unos pocos toques. Aquí hay algunos consejos sobre cómo utilizar Kinemaster Mod Digitbin APK para la edición de vídeo:
-Explorar la interfaz de usuario
-Cuando inicie la aplicación, verá una pantalla de bienvenida que le brinda tres opciones: Nuevo proyecto, Proyectos de navegador y Configuración. Toque en Nuevo proyecto para iniciar un nuevo proyecto de vídeo. A continuación, verá una pantalla que muestra el navegador multimedia, la línea de tiempo, la ventana de vista previa y la barra de herramientas.
-El navegador de medios le permite importar archivos multimedia desde su dispositivo de almacenamiento o servicios en la nube. También puede grabar vídeos o tomar fotos directamente desde la aplicación. La línea de tiempo muestra sus clips de vídeo y pistas de audio en una secuencia lineal. Puede arrastrarlos y soltarlos para reorganizarlos o recortarlos utilizando las manijas en los bordes. La ventana de vista previa muestra cómo se ve el vídeo a medida que lo edita. También puede usar gestos para acercar o alejar, rotar o recortar el vídeo. La barra de herramientas tiene botones para deshacer, rehacer, agregar medios, agregar capas, voz en off, mezclador de audio y exportar.
-Técnicas básicas de edición
-Para editar los clips de vídeo en Kinemaster Mod Digitbin APK, es necesario seleccionarlos en la línea de tiempo y luego toque en el icono de tijeras en la barra de herramientas. Esto abrirá un menú que le da opciones como dividir, cortar, copiar, eliminar, silenciar, ajustar el volumen, control de velocidad, filtro de color, ajuste de color, recorte, rotación, reflejo y mezcla.
-
-Funciones avanzadas de edición
-Kinemaster Mod Digitbin APK también ofrece algunas características avanzadas de edición que le permiten agregar más efectos y elementos a sus vídeos. Una de estas características es la adición de capas. Las capas son pistas adicionales que le permiten superponer imágenes, videos, texto, pegatinas, escritura a mano o efectos en la parte superior de la pista de vídeo principal. Para agregar una capa, toque en el botón Agregar capa en la barra de herramientas y luego elija el tipo de capa que desea agregar. A continuación, puede ajustar la posición, el tamaño, la opacidad y la animación de la capa en la ventana de vista previa.
-Otra función de edición avanzada es chroma key. Chroma key es una función que te permite cambiar el fondo de tus vídeos con cualquier imagen o vídeo. Esto puede ser muy útil para crear efectos especiales, como pantalla verde, o para cambiar el estado de ánimo o la atmósfera de sus videos. Para usar la tecla de croma, necesita tener un clip de video que tenga un fondo de color sólido, como verde o azul. Luego, debe agregarlo como una capa encima de otro clip de video que desea usar como nuevo fondo. A continuación, toque en la capa y luego toque en el botón de la tecla de croma en la barra de herramientas. Verás un control deslizante que te permite ajustar la intensidad del efecto de la tecla de croma. También puede utilizar la herramienta cuentagotas para seleccionar el color que desea eliminar de la capa.
-Agregar efectos y transiciones
-Kinemaster Mod Digitbin APK también le permite agregar efectos y transiciones a sus vídeos para hacerlos más dinámicos e interesantes. Los efectos son mejoras visuales que puede aplicar a sus clips de video o capas, como desenfoque, mosaico, viñeta, distorsión y más. Las transiciones son animaciones que puedes usar para conectar tus clips de video o capas sin problemas, como fade, slide, wipe, zoom y más.
-
-Para agregar una transición a su clip de vídeo o capa, toque en él y luego toque en el botón de transición en la barra de herramientas. Verá una lista de categorías que contienen diferentes transiciones. Toque en una categoría y luego elija una transición que le guste. También puede ajustar la duración y dirección de la transición usando los controles deslizantes.
-Mejora de audio en Kinemaster Mod Digitbin APK
-Kinemaster Mod Digitbin APK también le permite mejorar la calidad de audio de sus vídeos mediante la adición de música, efectos de sonido, voces en off, o ajustar el volumen y el tono. Puede agregar pistas de audio a sus videos tocando el botón Agregar medios en la barra de herramientas y luego elegir un archivo de audio desde su dispositivo de almacenamiento o servicios en la nube. También puede grabar su propia voz tocando el botón de voz en off en la barra de herramientas y luego hablando en el micrófono de su dispositivo.
-Para editar sus pistas de audio en Kinemaster Mod Digitbin APK, es necesario seleccionarlos en la línea de tiempo y luego toque en el icono de tijeras en la barra de herramientas. Esto abrirá un menú que le da opciones como dividir, cortar, copiar, borrar, silenciar, ajustar el volumen, control de velocidad, control de tono, reverberación, ecualizador y fundido in/out.
-Puedes usar estas opciones para modificar tus pistas de audio según tus necesidades. Por ejemplo, puede dividir una pista de audio en dos partes arrastrando el cabezal de reproducción a donde desea dividirla y luego tocando en split. También puede cortar una parte de una pista de audio seleccionándola y luego tocando en el corte. También puede copiar o eliminar una pista de audio pulsando en copiar o eliminar.
-Consejos para crear vídeos atractivos con Kinemaster Mod Digitbin APK
-Ahora que sabes cómo usar Kinemaster Mod Digitbin APK para la edición de vídeo, aquí hay algunos consejos que pueden ayudarle a crear vídeos interesantes con ella:
-Usar imágenes y metraje de alta calidad
-
-Elegir un tema adecuado y esquema de color
-El tema y la combinación de colores de su video pueden afectar el estado de ánimo y el tono de su mensaje. Trate de elegir un tema y un esquema de color que coincida con el propósito y la audiencia de su video. Por ejemplo, si usted está haciendo un video para una presentación de negocios, es posible que desee utilizar un tema profesional y formal y esquema de color. Si estás haciendo un video para una fiesta de cumpleaños, es posible que quieras usar un tema divertido y festivo y un esquema de color.
-Kinemaster Mod Digitbin APK ofrece una variedad de temas y esquemas de color que puede aplicar a sus vídeos. También puede personalizarlos cambiando el fondo, texto, pegatinas, efectos y transiciones. Para acceder a los temas y esquemas de color, toque en el botón de tema en la barra de herramientas y luego elija una categoría que se adapte a su video.
-Añadir texto y pegatinas para transmitir su mensaje
-El texto y las pegatinas son elementos útiles que pueden ayudarle a transmitir su mensaje de manera más clara y creativa. Puede usar texto y pegatinas para agregar títulos, subtítulos, subtítulos, citas, etiquetas, logotipos, emojis o cualquier otra información que desee incluir en su video. También puede usar texto y pegatinas para enfatizar ciertos puntos o agregar algo de humor o personalidad a su video.
-Kinemaster Mod Digitbin APK ofrece una gran cantidad de opciones de texto y pegatina que puede agregar a sus vídeos. También puede personalizarlos cambiando la fuente, el tamaño, el color, la alineación, la animación y la mezcla. Para añadir texto o pegatinas a tu vídeo, toca el botón Añadir capa de la barra de herramientas y luego elige texto o pegatina. A continuación, puede escribir o seleccionar el texto o pegatina que desea agregar y ajustarlo en la ventana de vista previa.
-Ajusta la velocidad y duración de tus clips
-
-Para ajustar la velocidad o la duración de sus clips en Kinemaster Mod Digitbin APK, toque en ellos y luego toque en el icono de tijeras en la barra de herramientas. Luego, toque en el control de velocidad o ajuste de duración. Verá un control deslizante que le permite cambiar la velocidad o la duración de sus clips por porcentaje o por segundos.
-Exporta tu vídeo en la mejor resolución y formato
-El paso final en la creación de un video con Kinemaster Mod Digitbin APK está exportando en la mejor resolución y formato para su propósito. La resolución es la calidad o claridad del vídeo, medida por píxeles. El formato es el tipo o la extensión de su archivo de video, como MP4, MOV, AVI, etc. La resolución y el formato de su video pueden afectar su tamaño, compatibilidad y rendimiento.
-Kinemaster Mod Digitbin APK le permite exportar su vídeo en diferentes resoluciones y formatos dependiendo de las capacidades y preferencias de su dispositivo. También puede elegir la velocidad de fotogramas (FPS) y la velocidad de bits (Mbps) de su vídeo para optimizar su suavidad y nitidez. Para exportar el vídeo en Kinemaster Mod Digitbin APK, toque en el botón de exportación en la barra de herramientas y luego elegir la resolución, formato, velocidad de fotogramas, tasa de bits, y el nombre de archivo que desee. Luego, toque en exportar de nuevo y espere a que el proceso termine.
-Conclusión
-Kinemaster Mod Digitbin APK es una gran aplicación para la edición de vídeo en dispositivos Android. Ofrece una gran cantidad de características y herramientas que pueden ayudarle a crear videos impresionantes sin marca de agua, anuncios o restricciones. También puedes usar funciones premium y chroma key gratis y mejorar tus vídeos con más creatividad y variedad. Para utilizar Kinemaster Mod Digitbin APK, es necesario descargar e instalar desde el enlace de abajo y luego siga los consejos e instrucciones en este artículo. Esperamos que haya encontrado este artículo útil e informativo. ¡Feliz edición de video!
-Preguntas frecuentes
-Aquí hay algunas preguntas frecuentes sobre Kinemaster Mod Digitbin APK:
-
-
-Sí, Kinemaster Mod Digitbin APK es seguro de usar siempre y cuando se descarga desde el enlace de abajo. Esta es una fuente verificada y confiable que no dañará su dispositivo o datos. Sin embargo, siempre debes tener cuidado al instalar aplicaciones de fuentes desconocidas y escanearlas con una aplicación antivirus antes de usarlas.
-- ¿Es Kinemaster Mod Digitbin APK legal de usar?
-Kinemaster Mod Digitbin APK no es una aplicación oficial de Kinemaster Corporation, pero una versión modificada por DigitBin.com. Por lo tanto, no es legal usarlo, ya que viola los términos y condiciones de la aplicación original. Sin embargo, no hay informes de ninguna acción legal tomada contra los usuarios de Kinemaster Mod Digitbin APK hasta el momento. Sin embargo, debe usarlo bajo su propio riesgo y responsabilidad.
-- ¿Kinemaster Mod Digitbin APK requieren acceso root?
-No, Kinemaster Mod Digitbin APK no requiere acceso de root para trabajar en su dispositivo. Puede instalarlo y usarlo sin rootear su dispositivo.
-- ¿Puedo usar Kinemaster Mod Digitbin APK en PC o dispositivos iOS?
-No, Kinemaster Mod Digitbin APK solo es compatible con dispositivos Android. No se puede utilizar en dispositivos PC o iOS.
-- ¿Cómo puedo actualizar Kinemaster Mod Digitbin APK?
-Kinemaster Mod Digitbin APK no tiene una función de actualización automática, por lo que debe verificar las actualizaciones manualmente. Puedes visitar el siguiente enlace para ver si hay una nueva versión disponible y descargarla si la hay. También puede seguir DigitBin.com en sus plataformas de redes sociales para recibir notificaciones de cualquier actualización.
-
64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py
deleted file mode 100644
index c5f0492ccbe9c727c835c12c84a1d8340366fa1e..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py
+++ /dev/null
@@ -1,102 +0,0 @@
-import logging
-import os.path
-from typing import List, Optional
-
-from pip._internal.cli.spinners import open_spinner
-from pip._internal.utils.setuptools_build import make_setuptools_bdist_wheel_args
-from pip._internal.utils.subprocess import call_subprocess, format_command_args
-
-logger = logging.getLogger(__name__)
-
-
-def format_command_result(
- command_args: List[str],
- command_output: str,
-) -> str:
- """Format command information for logging."""
- command_desc = format_command_args(command_args)
- text = f"Command arguments: {command_desc}\n"
-
- if not command_output:
- text += "Command output: None"
- elif logger.getEffectiveLevel() > logging.DEBUG:
- text += "Command output: [use --verbose to show]"
- else:
- if not command_output.endswith("\n"):
- command_output += "\n"
- text += f"Command output:\n{command_output}"
-
- return text
-
-
-def get_legacy_build_wheel_path(
- names: List[str],
- temp_dir: str,
- name: str,
- command_args: List[str],
- command_output: str,
-) -> Optional[str]:
- """Return the path to the wheel in the temporary build directory."""
- # Sort for determinism.
- names = sorted(names)
- if not names:
- msg = ("Legacy build of wheel for {!r} created no files.\n").format(name)
- msg += format_command_result(command_args, command_output)
- logger.warning(msg)
- return None
-
- if len(names) > 1:
- msg = (
- "Legacy build of wheel for {!r} created more than one file.\n"
- "Filenames (choosing first): {}\n"
- ).format(name, names)
- msg += format_command_result(command_args, command_output)
- logger.warning(msg)
-
- return os.path.join(temp_dir, names[0])
-
-
-def build_wheel_legacy(
- name: str,
- setup_py_path: str,
- source_dir: str,
- global_options: List[str],
- build_options: List[str],
- tempd: str,
-) -> Optional[str]:
- """Build one unpacked package using the "legacy" build process.
-
- Returns path to wheel if successfully built. Otherwise, returns None.
- """
- wheel_args = make_setuptools_bdist_wheel_args(
- setup_py_path,
- global_options=global_options,
- build_options=build_options,
- destination_dir=tempd,
- )
-
- spin_message = f"Building wheel for {name} (setup.py)"
- with open_spinner(spin_message) as spinner:
- logger.debug("Destination directory: %s", tempd)
-
- try:
- output = call_subprocess(
- wheel_args,
- command_desc="python setup.py bdist_wheel",
- cwd=source_dir,
- spinner=spinner,
- )
- except Exception:
- spinner.finish("error")
- logger.error("Failed building wheel for %s", name)
- return None
-
- names = os.listdir(tempd)
- wheel_path = get_legacy_build_wheel_path(
- names=names,
- temp_dir=tempd,
- name=name,
- command_args=wheel_args,
- command_output=output,
- )
- return wheel_path
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/rich/live_render.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/rich/live_render.py
deleted file mode 100644
index b90fbf7f35097694f727e201b0b378942d70a443..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/rich/live_render.py
+++ /dev/null
@@ -1,113 +0,0 @@
-import sys
-from typing import Optional, Tuple
-
-if sys.version_info >= (3, 8):
- from typing import Literal
-else:
- from pip._vendor.typing_extensions import Literal # pragma: no cover
-
-
-from ._loop import loop_last
-from .console import Console, ConsoleOptions, RenderableType, RenderResult
-from .control import Control
-from .segment import ControlType, Segment
-from .style import StyleType
-from .text import Text
-
-VerticalOverflowMethod = Literal["crop", "ellipsis", "visible"]
-
-
-class LiveRender:
- """Creates a renderable that may be updated.
-
- Args:
- renderable (RenderableType): Any renderable object.
- style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".
- """
-
- def __init__(
- self,
- renderable: RenderableType,
- style: StyleType = "",
- vertical_overflow: VerticalOverflowMethod = "ellipsis",
- ) -> None:
- self.renderable = renderable
- self.style = style
- self.vertical_overflow = vertical_overflow
- self._shape: Optional[Tuple[int, int]] = None
-
- def set_renderable(self, renderable: RenderableType) -> None:
- """Set a new renderable.
-
- Args:
- renderable (RenderableType): Any renderable object, including str.
- """
- self.renderable = renderable
-
- def position_cursor(self) -> Control:
- """Get control codes to move cursor to beginning of live render.
-
- Returns:
- Control: A control instance that may be printed.
- """
- if self._shape is not None:
- _, height = self._shape
- return Control(
- ControlType.CARRIAGE_RETURN,
- (ControlType.ERASE_IN_LINE, 2),
- *(
- (
- (ControlType.CURSOR_UP, 1),
- (ControlType.ERASE_IN_LINE, 2),
- )
- * (height - 1)
- )
- )
- return Control()
-
- def restore_cursor(self) -> Control:
- """Get control codes to clear the render and restore the cursor to its previous position.
-
- Returns:
- Control: A Control instance that may be printed.
- """
- if self._shape is not None:
- _, height = self._shape
- return Control(
- ControlType.CARRIAGE_RETURN,
- *((ControlType.CURSOR_UP, 1), (ControlType.ERASE_IN_LINE, 2)) * height
- )
- return Control()
-
- def __rich_console__(
- self, console: Console, options: ConsoleOptions
- ) -> RenderResult:
-
- renderable = self.renderable
- style = console.get_style(self.style)
- lines = console.render_lines(renderable, options, style=style, pad=False)
- shape = Segment.get_shape(lines)
-
- _, height = shape
- if height > options.size.height:
- if self.vertical_overflow == "crop":
- lines = lines[: options.size.height]
- shape = Segment.get_shape(lines)
- elif self.vertical_overflow == "ellipsis":
- lines = lines[: (options.size.height - 1)]
- overflow_text = Text(
- "...",
- overflow="crop",
- justify="center",
- end="",
- style="live.ellipsis",
- )
- lines.append(list(console.render(overflow_text)))
- shape = Segment.get_shape(lines)
- self._shape = shape
-
- new_line = Segment.line()
- for last, line in loop_last(lines):
- yield from line
- if not last:
- yield new_line
diff --git a/spaces/BilalQ/Stable_Difussion/README.md b/spaces/BilalQ/Stable_Difussion/README.md
deleted file mode 100644
index 5d51e7cb7574f781bb63fb81ab6bd1374dd6486d..0000000000000000000000000000000000000000
--- a/spaces/BilalQ/Stable_Difussion/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: Stable Difussion
-emoji: ⚡
-colorFrom: pink
-colorTo: red
-sdk: gradio
-sdk_version: 3.2
-app_file: app.py
-pinned: false
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/CVPR/BrAD/README.md b/spaces/CVPR/BrAD/README.md
deleted file mode 100644
index 1ff61a495e7ec3623afe83d889a95f80da4ab8e0..0000000000000000000000000000000000000000
--- a/spaces/CVPR/BrAD/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: BrAD
-emoji: 🏢
-colorFrom: blue
-colorTo: purple
-sdk: gradio
-sdk_version: 3.0.20
-app_file: app.py
-pinned: false
-license: apache-2.0
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
-
-
-This is a demo for the paper: "Unsupervised Domain Generalization by Learning a Bridge Across Domains"
-
-https://openaccess.thecvf.com/content/CVPR2022/papers/Harary_Unsupervised_Domain_Generalization_by_Learning_a_Bridge_Across_Domains_CVPR_2022_paper.pdf
\ No newline at end of file
diff --git a/spaces/CVPR/LIVE/thrust/thrust/detail/algorithm_wrapper.h b/spaces/CVPR/LIVE/thrust/thrust/detail/algorithm_wrapper.h
deleted file mode 100644
index c09b9a0a0b4dcc52924425d1549093668e5d2952..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/detail/algorithm_wrapper.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2020 NVIDIA Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-// When a compiler uses Thrust as part of its implementation of Standard C++
-// algorithms, a cycle of included files may result when Thrust code tries to
-// use a standard algorithm. Having a macro that is defined only when Thrust
-// is including an algorithms-related header gives the compiler a chance to
-// detect and break the cycle of includes.
-
-#define THRUST_INCLUDING_ALGORITHMS_HEADER
-#include
-#undef THRUST_INCLUDING_ALGORITHMS_HEADER
diff --git a/spaces/CVPR/LIVE/thrust/thrust/system/cuda/detail/core/agent_launcher.h b/spaces/CVPR/LIVE/thrust/thrust/system/cuda/detail/core/agent_launcher.h
deleted file mode 100644
index 7788481c7b85124d0873be11b8563372e457e724..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/system/cuda/detail/core/agent_launcher.h
+++ /dev/null
@@ -1,1184 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the NVIDIA CORPORATION nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- ******************************************************************************/
-#pragma once
-
-#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
-#include
-#include
-#include
-#include
-#include
-
-#if 0
-#define __THRUST__TEMPLATE_DEBUG
-#endif
-
-#if __THRUST__TEMPLATE_DEBUG
-template class ID_impl;
-template class Foo { ID_impl t;};
-#endif
-
-namespace thrust
-{
-namespace cuda_cub {
-namespace core {
-
-
-#if defined(__CUDA_ARCH__) || defined(__NVCOMPILER_CUDA__)
-#if 0
- template
- void __global__
- __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(Args... args)
- {
- extern __shared__ char shmem[];
- Agent::entry(args..., shmem);
- }
-#else
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, shmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE)
- {
- extern __shared__ char shmem[];
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE, shmem);
- }
-#endif
-
- ////////////////////////////////////////////////////////////
-
-
-#if 0
- template
- void __global__
- __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, Args... args)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(args..., vshmem);
- }
-#else
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, vshmem);
- }
- template
- void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
- _kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE)
- {
- extern __shared__ char shmem[];
- vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size::value;
- Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE, vshmem);
- }
-#endif
-#else
-#if 0
- template
- void __global__ _kernel_agent(Args... args) {}
- template
- void __global__ _kernel_agent_vshmem(char*, Args... args) {}
-#else
- template
- void __global__ _kernel_agent(_0) {}
- template
- void __global__ _kernel_agent(_0,_1) {}
- template
- void __global__ _kernel_agent(_0,_1,_2) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3, _4) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6, _7) {}
- template
- void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6, _7, _8) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC, _xD) {}
- template
- void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC, _xD, _xE) {}
- ////////////////////////////////////////////////////////////
- template
- void __global__ _kernel_agent_vshmem(char*,_0) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6, _7) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6, _7, _8) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD) {}
- template
- void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD, _xE) {}
-#endif
-#endif
-
-
- template
- struct AgentLauncher : Agent
- {
- core::AgentPlan plan;
- size_t count;
- cudaStream_t stream;
- char const* name;
- bool debug_sync;
- unsigned int grid;
- char* vshmem;
- bool has_shmem;
- size_t shmem_size;
-
- enum
- {
- MAX_SHMEM_PER_BLOCK = 48 * 1024,
- };
- typedef
- typename has_enough_shmem::type has_enough_shmem_t;
- typedef
- has_enough_shmem shm1;
-
- template
- THRUST_RUNTIME_FUNCTION
- AgentLauncher(AgentPlan plan_,
- Size count_,
- cudaStream_t stream_,
- char const* name_,
- bool debug_sync_)
- : plan(plan_),
- count((size_t)count_),
- stream(stream_),
- name(name_),
- debug_sync(debug_sync_),
- grid(static_cast((count + plan.items_per_tile - 1) / plan.items_per_tile)),
- vshmem(NULL),
- has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
- shmem_size(has_shmem ? plan.shared_memory_size : 0)
- {
- assert(count > 0);
- }
-
- template
- THRUST_RUNTIME_FUNCTION
- AgentLauncher(AgentPlan plan_,
- Size count_,
- cudaStream_t stream_,
- char* vshmem,
- char const* name_,
- bool debug_sync_)
- : plan(plan_),
- count((size_t)count_),
- stream(stream_),
- name(name_),
- debug_sync(debug_sync_),
- grid(static_cast((count + plan.items_per_tile - 1) / plan.items_per_tile)),
- vshmem(vshmem),
- has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
- shmem_size(has_shmem ? plan.shared_memory_size : 0)
- {
- assert(count > 0);
- }
-
- THRUST_RUNTIME_FUNCTION
- AgentLauncher(AgentPlan plan_,
- cudaStream_t stream_,
- char const* name_,
- bool debug_sync_)
- : plan(plan_),
- count(0),
- stream(stream_),
- name(name_),
- debug_sync(debug_sync_),
- grid(plan.grid_size),
- vshmem(NULL),
- has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
- shmem_size(has_shmem ? plan.shared_memory_size : 0)
- {
- assert(plan.grid_size > 0);
- }
-
- THRUST_RUNTIME_FUNCTION
- AgentLauncher(AgentPlan plan_,
- cudaStream_t stream_,
- char* vshmem,
- char const* name_,
- bool debug_sync_)
- : plan(plan_),
- count(0),
- stream(stream_),
- name(name_),
- debug_sync(debug_sync_),
- grid(plan.grid_size),
- vshmem(vshmem),
- has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
- shmem_size(has_shmem ? plan.shared_memory_size : 0)
- {
- assert(plan.grid_size > 0);
- }
-
-#if 0
- THRUST_RUNTIME_FUNCTION
- AgentPlan static get_plan(cudaStream_t s, void* d_ptr = 0)
- {
- // in separable compilation mode, we have no choice
- // but to call kernel to get agent_plan
- // otherwise the risk is something may fail
- // if user mix & match ptx versions in a separably compiled function
- // http://nvbugs/1772071
- // XXX may be it is too string of a requirements, consider relaxing it in
- // the future
-#ifdef __CUDACC_RDC__
- return core::get_agent_plan(s, d_ptr);
-#else
- core::cuda_optional ptx_version = core::get_ptx_version();
- //CUDA_CUB_RET_IF_FAIL(ptx_version.status());
- return get_agent_plan(ptx_version);
-#endif
- }
- THRUST_RUNTIME_FUNCTION
- AgentPlan static get_plan_default()
- {
- return get_agent_plan(sm_arch<0>::type::ver);
- }
-#endif
-
- THRUST_RUNTIME_FUNCTION
- typename core::get_plan::type static get_plan(cudaStream_t , void* d_ptr = 0)
- {
- THRUST_UNUSED_VAR(d_ptr);
- core::cuda_optional ptx_version = core::get_ptx_version();
- return get_agent_plan(ptx_version);
- }
-
- THRUST_RUNTIME_FUNCTION
- typename core::get_plan::type static get_plan()
- {
- return get_agent_plan(lowest_supported_sm_arch::ver);
- }
-
- THRUST_RUNTIME_FUNCTION void sync() const
- {
- if (debug_sync)
- {
- if (THRUST_IS_DEVICE_CODE) {
- #if THRUST_INCLUDE_DEVICE_CODE
- cudaDeviceSynchronize();
- #endif
- } else {
- #if THRUST_INCLUDE_HOST_CODE
- cudaStreamSynchronize(stream);
- #endif
- }
- }
- }
-
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- max_blocks_per_sm_impl(K k, int block_threads)
- {
- int occ;
- cudaError_t status = cub::MaxSmOccupancy(occ, k, block_threads);
- return cuda_optional(status == cudaSuccess ? occ : -1, status);
- }
-
- template
- cuda_optional THRUST_RUNTIME_FUNCTION
- max_sm_occupancy(K k) const
- {
- return max_blocks_per_sm_impl(k, plan.block_threads);
- }
-
-
-
- template
- THRUST_RUNTIME_FUNCTION
- void print_info(K k) const
- {
- if (debug_sync)
- {
- cuda_optional occ = max_sm_occupancy(k);
- core::cuda_optional ptx_version = core::get_ptx_version();
- if (count > 0)
- {
- _CubLog("Invoking %s<<<%u, %d, %d, %lld>>>(), %llu items total, %d items per thread, %d SM occupancy, %d vshmem size, %d ptx_version \n",
- name,
- grid,
- plan.block_threads,
- (has_shmem ? (int)plan.shared_memory_size : 0),
- (long long)stream,
- (long long)count,
- plan.items_per_thread,
- (int)occ,
- (!has_shmem ? (int)plan.shared_memory_size : 0),
- (int)ptx_version);
- }
- else
- {
- _CubLog("Invoking %s<<<%u, %d, %d, %lld>>>(), %d items per thread, %d SM occupancy, %d vshmem size, %d ptx_version\n",
- name,
- grid,
- plan.block_threads,
- (has_shmem ? (int)plan.shared_memory_size : 0),
- (long long)stream,
- plan.items_per_thread,
- (int)occ,
- (!has_shmem ? (int)plan.shared_memory_size : 0),
- (int)ptx_version);
- }
- }
- }
-
- ////////////////////
- // Variadic code
- ////////////////////
-
-#if 0
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- return max_blocks_per_sm_impl(_kernel_agent, plan.block_threads);
- }
-#else
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0, _1) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
- template
- static cuda_optional THRUST_RUNTIME_FUNCTION
- get_max_blocks_per_sm(AgentPlan plan)
- {
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE) = _kernel_agent;
- return max_blocks_per_sm_impl(ptr, plan.block_threads);
- }
-#endif
-
-
-
-#if 0
-
- // If we are guaranteed to have enough shared memory
- // don't compile other kernel which accepts pointer
- // and save on compilations
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, Args... args) const
- {
- assert(has_shmem && vshmem == NULL);
- print_info(_kernel_agent);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(_kernel_agent, args...);
- }
-
- // If there is a risk of not having enough shared memory
- // we compile generic kernel instead.
- // This kernel is likely to be somewhat slower, but it can accomodate
- // both shared and virtualized shared memories.
- // Alternative option is to compile two kernels, one using shared and one
- // using virtualized shared memory. While this can be slightly faster if we
- // do actually have enough shared memory, the compilation time will double.
- //
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, Args... args) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- print_info(_kernel_agent_vshmem);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(_kernel_agent_vshmem, vshmem, args...);
- }
-
- template
- void THRUST_RUNTIME_FUNCTION
- launch(Args... args) const
- {
-#if __THRUST__TEMPLATE_DEBUG
-#ifdef __CUDA_ARCH__
- typedef typename Foo<
- shm1::v1,
- shm1::v2,
- shm1::v3,
- shm1::v4,
- shm1::v5>::t tt;
-#endif
-#endif
- launch_impl(has_enough_shmem_t(),args...);
- sync();
- }
-#else
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8) = _kernel_agent_vshmem;
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC,_xD xD) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC,_xD xD,_xE xE) const
- {
- assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
- void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD, _xE) = _kernel_agent_vshmem;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
- .doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
- }
-
- ////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////
-
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0, _1) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE) const
- {
- assert(has_shmem && vshmem == NULL);
- void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE) = _kernel_agent;
- print_info(ptr);
- launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
- .doit(ptr,x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
- }
-
- ////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////
-
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0) const
- {
- launch_impl(has_enough_shmem_t(), x0);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
- sync();
- }
- template
- void THRUST_RUNTIME_FUNCTION
- launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE) const
- {
- launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
- sync();
- }
-#endif
-
-
- };
-
-} // namespace core
-}
-} // end namespace thrust
-#endif
diff --git a/spaces/CVPR/lama-example/saicinpainting/evaluation/utils.py b/spaces/CVPR/lama-example/saicinpainting/evaluation/utils.py
deleted file mode 100644
index 6d7c15c9242ed8a9bc59fbb3b450cca394720bb8..0000000000000000000000000000000000000000
--- a/spaces/CVPR/lama-example/saicinpainting/evaluation/utils.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from enum import Enum
-
-import yaml
-from easydict import EasyDict as edict
-import torch.nn as nn
-import torch
-
-
-def load_yaml(path):
- with open(path, 'r') as f:
- return edict(yaml.safe_load(f))
-
-
-def move_to_device(obj, device):
- if isinstance(obj, nn.Module):
- return obj.to(device)
- if torch.is_tensor(obj):
- return obj.to(device)
- if isinstance(obj, (tuple, list)):
- return [move_to_device(el, device) for el in obj]
- if isinstance(obj, dict):
- return {name: move_to_device(val, device) for name, val in obj.items()}
- raise ValueError(f'Unexpected type {type(obj)}')
-
-
-class SmallMode(Enum):
- DROP = "drop"
- UPSCALE = "upscale"
diff --git a/spaces/CVPR/lama-example/saicinpainting/training/trainers/default.py b/spaces/CVPR/lama-example/saicinpainting/training/trainers/default.py
deleted file mode 100644
index 86c7f0fab42924bfc93a031e851117634c70f593..0000000000000000000000000000000000000000
--- a/spaces/CVPR/lama-example/saicinpainting/training/trainers/default.py
+++ /dev/null
@@ -1,175 +0,0 @@
-import logging
-
-import torch
-import torch.nn.functional as F
-from omegaconf import OmegaConf
-
-from saicinpainting.training.data.datasets import make_constant_area_crop_params
-from saicinpainting.training.losses.distance_weighting import make_mask_distance_weighter
-from saicinpainting.training.losses.feature_matching import feature_matching_loss, masked_l1_loss
-from saicinpainting.training.modules.fake_fakes import FakeFakesGenerator
-from saicinpainting.training.trainers.base import BaseInpaintingTrainingModule, make_multiscale_noise
-from saicinpainting.utils import add_prefix_to_keys, get_ramp
-
-LOGGER = logging.getLogger(__name__)
-
-
-def make_constant_area_crop_batch(batch, **kwargs):
- crop_y, crop_x, crop_height, crop_width = make_constant_area_crop_params(img_height=batch['image'].shape[2],
- img_width=batch['image'].shape[3],
- **kwargs)
- batch['image'] = batch['image'][:, :, crop_y : crop_y + crop_height, crop_x : crop_x + crop_width]
- batch['mask'] = batch['mask'][:, :, crop_y: crop_y + crop_height, crop_x: crop_x + crop_width]
- return batch
-
-
-class DefaultInpaintingTrainingModule(BaseInpaintingTrainingModule):
- def __init__(self, *args, concat_mask=True, rescale_scheduler_kwargs=None, image_to_discriminator='predicted_image',
- add_noise_kwargs=None, noise_fill_hole=False, const_area_crop_kwargs=None,
- distance_weighter_kwargs=None, distance_weighted_mask_for_discr=False,
- fake_fakes_proba=0, fake_fakes_generator_kwargs=None,
- **kwargs):
- super().__init__(*args, **kwargs)
- self.concat_mask = concat_mask
- self.rescale_size_getter = get_ramp(**rescale_scheduler_kwargs) if rescale_scheduler_kwargs is not None else None
- self.image_to_discriminator = image_to_discriminator
- self.add_noise_kwargs = add_noise_kwargs
- self.noise_fill_hole = noise_fill_hole
- self.const_area_crop_kwargs = const_area_crop_kwargs
- self.refine_mask_for_losses = make_mask_distance_weighter(**distance_weighter_kwargs) \
- if distance_weighter_kwargs is not None else None
- self.distance_weighted_mask_for_discr = distance_weighted_mask_for_discr
-
- self.fake_fakes_proba = fake_fakes_proba
- if self.fake_fakes_proba > 1e-3:
- self.fake_fakes_gen = FakeFakesGenerator(**(fake_fakes_generator_kwargs or {}))
-
- def forward(self, batch):
- if self.training and self.rescale_size_getter is not None:
- cur_size = self.rescale_size_getter(self.global_step)
- batch['image'] = F.interpolate(batch['image'], size=cur_size, mode='bilinear', align_corners=False)
- batch['mask'] = F.interpolate(batch['mask'], size=cur_size, mode='nearest')
-
- if self.training and self.const_area_crop_kwargs is not None:
- batch = make_constant_area_crop_batch(batch, **self.const_area_crop_kwargs)
-
- img = batch['image']
- mask = batch['mask']
-
- masked_img = img * (1 - mask)
-
- if self.add_noise_kwargs is not None:
- noise = make_multiscale_noise(masked_img, **self.add_noise_kwargs)
- if self.noise_fill_hole:
- masked_img = masked_img + mask * noise[:, :masked_img.shape[1]]
- masked_img = torch.cat([masked_img, noise], dim=1)
-
- if self.concat_mask:
- masked_img = torch.cat([masked_img, mask], dim=1)
-
- batch['predicted_image'] = self.generator(masked_img)
- batch['inpainted'] = mask * batch['predicted_image'] + (1 - mask) * batch['image']
-
- if self.fake_fakes_proba > 1e-3:
- if self.training and torch.rand(1).item() < self.fake_fakes_proba:
- batch['fake_fakes'], batch['fake_fakes_masks'] = self.fake_fakes_gen(img, mask)
- batch['use_fake_fakes'] = True
- else:
- batch['fake_fakes'] = torch.zeros_like(img)
- batch['fake_fakes_masks'] = torch.zeros_like(mask)
- batch['use_fake_fakes'] = False
-
- batch['mask_for_losses'] = self.refine_mask_for_losses(img, batch['predicted_image'], mask) \
- if self.refine_mask_for_losses is not None and self.training \
- else mask
-
- return batch
-
- def generator_loss(self, batch):
- img = batch['image']
- predicted_img = batch[self.image_to_discriminator]
- original_mask = batch['mask']
- supervised_mask = batch['mask_for_losses']
-
- # L1
- l1_value = masked_l1_loss(predicted_img, img, supervised_mask,
- self.config.losses.l1.weight_known,
- self.config.losses.l1.weight_missing)
-
- total_loss = l1_value
- metrics = dict(gen_l1=l1_value)
-
- # vgg-based perceptual loss
- if self.config.losses.perceptual.weight > 0:
- pl_value = self.loss_pl(predicted_img, img, mask=supervised_mask).sum() * self.config.losses.perceptual.weight
- total_loss = total_loss + pl_value
- metrics['gen_pl'] = pl_value
-
- # discriminator
- # adversarial_loss calls backward by itself
- mask_for_discr = supervised_mask if self.distance_weighted_mask_for_discr else original_mask
- self.adversarial_loss.pre_generator_step(real_batch=img, fake_batch=predicted_img,
- generator=self.generator, discriminator=self.discriminator)
- discr_real_pred, discr_real_features = self.discriminator(img)
- discr_fake_pred, discr_fake_features = self.discriminator(predicted_img)
- adv_gen_loss, adv_metrics = self.adversarial_loss.generator_loss(real_batch=img,
- fake_batch=predicted_img,
- discr_real_pred=discr_real_pred,
- discr_fake_pred=discr_fake_pred,
- mask=mask_for_discr)
- total_loss = total_loss + adv_gen_loss
- metrics['gen_adv'] = adv_gen_loss
- metrics.update(add_prefix_to_keys(adv_metrics, 'adv_'))
-
- # feature matching
- if self.config.losses.feature_matching.weight > 0:
- need_mask_in_fm = OmegaConf.to_container(self.config.losses.feature_matching).get('pass_mask', False)
- mask_for_fm = supervised_mask if need_mask_in_fm else None
- fm_value = feature_matching_loss(discr_fake_features, discr_real_features,
- mask=mask_for_fm) * self.config.losses.feature_matching.weight
- total_loss = total_loss + fm_value
- metrics['gen_fm'] = fm_value
-
- if self.loss_resnet_pl is not None:
- resnet_pl_value = self.loss_resnet_pl(predicted_img, img)
- total_loss = total_loss + resnet_pl_value
- metrics['gen_resnet_pl'] = resnet_pl_value
-
- return total_loss, metrics
-
- def discriminator_loss(self, batch):
- total_loss = 0
- metrics = {}
-
- predicted_img = batch[self.image_to_discriminator].detach()
- self.adversarial_loss.pre_discriminator_step(real_batch=batch['image'], fake_batch=predicted_img,
- generator=self.generator, discriminator=self.discriminator)
- discr_real_pred, discr_real_features = self.discriminator(batch['image'])
- discr_fake_pred, discr_fake_features = self.discriminator(predicted_img)
- adv_discr_loss, adv_metrics = self.adversarial_loss.discriminator_loss(real_batch=batch['image'],
- fake_batch=predicted_img,
- discr_real_pred=discr_real_pred,
- discr_fake_pred=discr_fake_pred,
- mask=batch['mask'])
- total_loss = total_loss + adv_discr_loss
- metrics['discr_adv'] = adv_discr_loss
- metrics.update(add_prefix_to_keys(adv_metrics, 'adv_'))
-
-
- if batch.get('use_fake_fakes', False):
- fake_fakes = batch['fake_fakes']
- self.adversarial_loss.pre_discriminator_step(real_batch=batch['image'], fake_batch=fake_fakes,
- generator=self.generator, discriminator=self.discriminator)
- discr_fake_fakes_pred, _ = self.discriminator(fake_fakes)
- fake_fakes_adv_discr_loss, fake_fakes_adv_metrics = self.adversarial_loss.discriminator_loss(
- real_batch=batch['image'],
- fake_batch=fake_fakes,
- discr_real_pred=discr_real_pred,
- discr_fake_pred=discr_fake_fakes_pred,
- mask=batch['mask']
- )
- total_loss = total_loss + fake_fakes_adv_discr_loss
- metrics['discr_adv_fake_fakes'] = fake_fakes_adv_discr_loss
- metrics.update(add_prefix_to_keys(fake_fakes_adv_metrics, 'adv_'))
-
- return total_loss, metrics
diff --git a/spaces/CVPR/regionclip-demo/detectron2/data/datasets/pascal_voc.py b/spaces/CVPR/regionclip-demo/detectron2/data/datasets/pascal_voc.py
deleted file mode 100644
index dbbf82cb96442bfa0cf05ed0f4dddf3645434b7e..0000000000000000000000000000000000000000
--- a/spaces/CVPR/regionclip-demo/detectron2/data/datasets/pascal_voc.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) Facebook, Inc. and its affiliates.
-
-import numpy as np
-import os
-import xml.etree.ElementTree as ET
-from typing import List, Tuple, Union
-
-from detectron2.data import DatasetCatalog, MetadataCatalog
-from detectron2.structures import BoxMode
-from detectron2.utils.file_io import PathManager
-
-__all__ = ["load_voc_instances", "register_pascal_voc"]
-
-
-# fmt: off
-CLASS_NAMES = (
- "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat",
- "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person",
- "pottedplant", "sheep", "sofa", "train", "tvmonitor"
-)
-# fmt: on
-
-
-def load_voc_instances(dirname: str, split: str, class_names: Union[List[str], Tuple[str, ...]]):
- """
- Load Pascal VOC detection annotations to Detectron2 format.
-
- Args:
- dirname: Contain "Annotations", "ImageSets", "JPEGImages"
- split (str): one of "train", "test", "val", "trainval"
- class_names: list or tuple of class names
- """
- with PathManager.open(os.path.join(dirname, "ImageSets", "Main", split + ".txt")) as f:
- fileids = np.loadtxt(f, dtype=np.str)
-
- # Needs to read many small annotation files. Makes sense at local
- annotation_dirname = PathManager.get_local_path(os.path.join(dirname, "Annotations/"))
- dicts = []
- for fileid in fileids:
- anno_file = os.path.join(annotation_dirname, fileid + ".xml")
- jpeg_file = os.path.join(dirname, "JPEGImages", fileid + ".jpg")
-
- with PathManager.open(anno_file) as f:
- tree = ET.parse(f)
-
- r = {
- "file_name": jpeg_file,
- "image_id": fileid,
- "height": int(tree.findall("./size/height")[0].text),
- "width": int(tree.findall("./size/width")[0].text),
- }
- instances = []
-
- for obj in tree.findall("object"):
- cls = obj.find("name").text
- # We include "difficult" samples in training.
- # Based on limited experiments, they don't hurt accuracy.
- # difficult = int(obj.find("difficult").text)
- # if difficult == 1:
- # continue
- bbox = obj.find("bndbox")
- bbox = [float(bbox.find(x).text) for x in ["xmin", "ymin", "xmax", "ymax"]]
- # Original annotations are integers in the range [1, W or H]
- # Assuming they mean 1-based pixel indices (inclusive),
- # a box with annotation (xmin=1, xmax=W) covers the whole image.
- # In coordinate space this is represented by (xmin=0, xmax=W)
- bbox[0] -= 1.0
- bbox[1] -= 1.0
- instances.append(
- {"category_id": class_names.index(cls), "bbox": bbox, "bbox_mode": BoxMode.XYXY_ABS}
- )
- r["annotations"] = instances
- dicts.append(r)
- return dicts
-
-
-def register_pascal_voc(name, dirname, split, year, class_names=CLASS_NAMES):
- DatasetCatalog.register(name, lambda: load_voc_instances(dirname, split, class_names))
- MetadataCatalog.get(name).set(
- thing_classes=list(class_names), dirname=dirname, year=year, split=split
- )
diff --git a/spaces/ChandraMohanNayal/AutoGPT/autogpt/json_utils/json_fix_llm.py b/spaces/ChandraMohanNayal/AutoGPT/autogpt/json_utils/json_fix_llm.py
deleted file mode 100644
index 869aed125cfb8cd7a69ed02eeb389cc72a3e296b..0000000000000000000000000000000000000000
--- a/spaces/ChandraMohanNayal/AutoGPT/autogpt/json_utils/json_fix_llm.py
+++ /dev/null
@@ -1,220 +0,0 @@
-"""This module contains functions to fix JSON strings generated by LLM models, such as ChatGPT, using the assistance
-of the ChatGPT API or LLM models."""
-from __future__ import annotations
-
-import contextlib
-import json
-from typing import Any, Dict
-
-from colorama import Fore
-from regex import regex
-
-from autogpt.config import Config
-from autogpt.json_utils.json_fix_general import correct_json
-from autogpt.llm_utils import call_ai_function
-from autogpt.logs import logger
-from autogpt.speech import say_text
-
-JSON_SCHEMA = """
-{
- "command": {
- "name": "command name",
- "args": {
- "arg name": "value"
- }
- },
- "thoughts":
- {
- "text": "thought",
- "reasoning": "reasoning",
- "plan": "- short bulleted\n- list that conveys\n- long-term plan",
- "criticism": "constructive self-criticism",
- "speak": "thoughts summary to say to user"
- }
-}
-"""
-
-CFG = Config()
-
-
-def auto_fix_json(json_string: str, schema: str) -> str:
- """Fix the given JSON string to make it parseable and fully compliant with
- the provided schema using GPT-3.
-
- Args:
- json_string (str): The JSON string to fix.
- schema (str): The schema to use to fix the JSON.
- Returns:
- str: The fixed JSON string.
- """
- # Try to fix the JSON using GPT:
- function_string = "def fix_json(json_string: str, schema:str=None) -> str:"
- args = [f"'''{json_string}'''", f"'''{schema}'''"]
- description_string = (
- "This function takes a JSON string and ensures that it"
- " is parseable and fully compliant with the provided schema. If an object"
- " or field specified in the schema isn't contained within the correct JSON,"
- " it is omitted. The function also escapes any double quotes within JSON"
- " string values to ensure that they are valid. If the JSON string contains"
- " any None or NaN values, they are replaced with null before being parsed."
- )
-
- # If it doesn't already start with a "`", add one:
- if not json_string.startswith("`"):
- json_string = "```json\n" + json_string + "\n```"
- result_string = call_ai_function(
- function_string, args, description_string, model=CFG.fast_llm_model
- )
- logger.debug("------------ JSON FIX ATTEMPT ---------------")
- logger.debug(f"Original JSON: {json_string}")
- logger.debug("-----------")
- logger.debug(f"Fixed JSON: {result_string}")
- logger.debug("----------- END OF FIX ATTEMPT ----------------")
-
- try:
- json.loads(result_string) # just check the validity
- return result_string
- except json.JSONDecodeError: # noqa: E722
- # Get the call stack:
- # import traceback
- # call_stack = traceback.format_exc()
- # print(f"Failed to fix JSON: '{json_string}' "+call_stack)
- return "failed"
-
-
-def fix_json_using_multiple_techniques(assistant_reply: str) -> Dict[Any, Any]:
- """Fix the given JSON string to make it parseable and fully compliant with two techniques.
-
- Args:
- json_string (str): The JSON string to fix.
-
- Returns:
- str: The fixed JSON string.
- """
-
- # Parse and print Assistant response
- assistant_reply_json = fix_and_parse_json(assistant_reply)
- if assistant_reply_json == {}:
- assistant_reply_json = attempt_to_fix_json_by_finding_outermost_brackets(
- assistant_reply
- )
-
- if assistant_reply_json != {}:
- return assistant_reply_json
-
- logger.error(
- "Error: The following AI output couldn't be converted to a JSON:\n",
- assistant_reply,
- )
- if CFG.speak_mode:
- say_text("I have received an invalid JSON response from the OpenAI API.")
-
- return {}
-
-
-def fix_and_parse_json(
- json_to_load: str, try_to_fix_with_gpt: bool = True
-) -> Dict[Any, Any]:
- """Fix and parse JSON string
-
- Args:
- json_to_load (str): The JSON string.
- try_to_fix_with_gpt (bool, optional): Try to fix the JSON with GPT.
- Defaults to True.
-
- Returns:
- str or dict[Any, Any]: The parsed JSON.
- """
-
- with contextlib.suppress(json.JSONDecodeError):
- json_to_load = json_to_load.replace("\t", "")
- return json.loads(json_to_load)
-
- with contextlib.suppress(json.JSONDecodeError):
- json_to_load = correct_json(json_to_load)
- return json.loads(json_to_load)
- # Let's do something manually:
- # sometimes GPT responds with something BEFORE the braces:
- # "I'm sorry, I don't understand. Please try again."
- # {"text": "I'm sorry, I don't understand. Please try again.",
- # "confidence": 0.0}
- # So let's try to find the first brace and then parse the rest
- # of the string
- try:
- brace_index = json_to_load.index("{")
- maybe_fixed_json = json_to_load[brace_index:]
- last_brace_index = maybe_fixed_json.rindex("}")
- maybe_fixed_json = maybe_fixed_json[: last_brace_index + 1]
- return json.loads(maybe_fixed_json)
- except (json.JSONDecodeError, ValueError) as e:
- return try_ai_fix(try_to_fix_with_gpt, e, json_to_load)
-
-
-def try_ai_fix(
- try_to_fix_with_gpt: bool, exception: Exception, json_to_load: str
-) -> Dict[Any, Any]:
- """Try to fix the JSON with the AI
-
- Args:
- try_to_fix_with_gpt (bool): Whether to try to fix the JSON with the AI.
- exception (Exception): The exception that was raised.
- json_to_load (str): The JSON string to load.
-
- Raises:
- exception: If try_to_fix_with_gpt is False.
-
- Returns:
- str or dict[Any, Any]: The JSON string or dictionary.
- """
- if not try_to_fix_with_gpt:
- raise exception
- if CFG.debug_mode:
- logger.warn(
- "Warning: Failed to parse AI output, attempting to fix."
- "\n If you see this warning frequently, it's likely that"
- " your prompt is confusing the AI. Try changing it up"
- " slightly."
- )
- # Now try to fix this up using the ai_functions
- ai_fixed_json = auto_fix_json(json_to_load, JSON_SCHEMA)
-
- if ai_fixed_json != "failed":
- return json.loads(ai_fixed_json)
- # This allows the AI to react to the error message,
- # which usually results in it correcting its ways.
- # logger.error("Failed to fix AI output, telling the AI.")
- return {}
-
-
-def attempt_to_fix_json_by_finding_outermost_brackets(json_string: str):
- if CFG.speak_mode and CFG.debug_mode:
- say_text(
- "I have received an invalid JSON response from the OpenAI API. "
- "Trying to fix it now."
- )
- logger.error("Attempting to fix JSON by finding outermost brackets\n")
-
- try:
- json_pattern = regex.compile(r"\{(?:[^{}]|(?R))*\}")
- json_match = json_pattern.search(json_string)
-
- if json_match:
- # Extract the valid JSON object from the string
- json_string = json_match.group(0)
- logger.typewriter_log(
- title="Apparently json was fixed.", title_color=Fore.GREEN
- )
- if CFG.speak_mode and CFG.debug_mode:
- say_text("Apparently json was fixed.")
- else:
- return {}
-
- except (json.JSONDecodeError, ValueError):
- if CFG.debug_mode:
- logger.error(f"Error: Invalid JSON: {json_string}\n")
- if CFG.speak_mode:
- say_text("Didn't work. I will have to ignore this response then.")
- logger.error("Error: Invalid JSON, setting it to empty JSON now.\n")
- json_string = {}
-
- return fix_and_parse_json(json_string)
diff --git a/spaces/CognitiveLabs/GPT-4-Vision-Chat/chainlit.md b/spaces/CognitiveLabs/GPT-4-Vision-Chat/chainlit.md
deleted file mode 100644
index fbde825234e7221d3490b0f312bacde0cedc3e97..0000000000000000000000000000000000000000
--- a/spaces/CognitiveLabs/GPT-4-Vision-Chat/chainlit.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Welcome to GPT 4 turbo vision! 🚀🤖
-
-## Upload an image 🔗
-- option 1) Drag & Drop
-- option 2) Click in the "UPLOAD FILES" button, on the left of the chat input 💬
-- option 3) Copy a image and paste it in the chat input (ctrl + v)
-
-### ~~GPT-4-1106-preview~~ for messages that ARE NOT images 📝
-* change log:
- - Changed GPT-4-1106-preview for gpt-3.5-turbo-1106, due high cost of GPT-4-1106-preview
-### gpt-4-vision-preview for messages that ARE images 📷
-If you upload more than 1 image, it will take the first image, this is just for demo purposes
-* change log:
- - Change max_tokens from the output to 300
- - Clear image history after the response
- - image size limit set to 1mb
-
-
-For suggestions you can use the community tab or open an issue in the github repository: [gpt-4-vision-chat](https://github.com/GianfrancoCorrea/gpt-4-vision-chat)
\ No newline at end of file
diff --git a/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/datasets/builders/video_caption_builder.py b/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/datasets/builders/video_caption_builder.py
deleted file mode 100644
index e73ef9db75c4699e1a763b459a7c96c1147e192b..0000000000000000000000000000000000000000
--- a/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/datasets/builders/video_caption_builder.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import os
-import logging
-import warnings
-
-from video_llama.common.registry import registry
-from video_llama.datasets.builders.base_dataset_builder import BaseDatasetBuilder
-from video_llama.datasets.datasets.webvid_datasets import WebvidDataset
-
-@registry.register_builder("webvid")
-class WebvidBuilder(BaseDatasetBuilder):
- train_dataset_cls = WebvidDataset
- DATASET_CONFIG_DICT = {"default": "configs/datasets/webvid/defaults.yaml"}
-
- def _download_ann(self):
- pass
-
- def _download_vis(self):
- pass
-
- def build(self):
- self.build_processors()
- datasets = dict()
- split = "train"
-
- build_info = self.config.build_info
- dataset_cls = self.train_dataset_cls
- datasets[split] = dataset_cls(
- vis_processor=self.vis_processors[split],
- text_processor=self.text_processors[split],
- vis_root=build_info.videos_dir,
- ann_root=build_info.anno_dir
- )
-
- return datasets
\ No newline at end of file
diff --git a/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/models/video_llama.py b/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/models/video_llama.py
deleted file mode 100644
index c287887992ab48fdb7306cba2f6703e6b081712c..0000000000000000000000000000000000000000
--- a/spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/models/video_llama.py
+++ /dev/null
@@ -1,424 +0,0 @@
-import logging
-import random
-
-import torch
-from torch.cuda.amp import autocast as autocast
-import torch.nn as nn
-
-from video_llama.common.registry import registry
-from video_llama.models.blip2 import Blip2Base, disabled_train
-from video_llama.models.modeling_llama import LlamaForCausalLM
-# from video_llama.models.Qformer import BertEncoder
-from transformers import LlamaTokenizer,BertConfig
-# from transformers.models.bert.modeling_bert import BertEncoder
-import einops
-import copy
-import os
-from video_llama.models.Qformer import BertConfig, BertLMHeadModel
-# from flamingo_pytorch import PerceiverResampler
-@registry.register_model("video_llama")
-class VideoLLAMA(Blip2Base):
- """
- BLIP2 GPT-LLAMA model.
- """
-
- PRETRAINED_MODEL_CONFIG_DICT = {
- "pretrain_vicuna": "configs/models/video_llama.yaml",
- }
-
- @classmethod
- def init_video_Qformer(cls, num_query_token, vision_width,num_hidden_layers =2):
- encoder_config = BertConfig.from_pretrained("bert-base-uncased")
- encoder_config.num_hidden_layers = num_hidden_layers
- encoder_config.encoder_width = vision_width
- # insert cross-attention layer every other block
- encoder_config.add_cross_attention = True
- encoder_config.cross_attention_freq = 1
- encoder_config.query_length = num_query_token
- Qformer = BertLMHeadModel(config=encoder_config)
- query_tokens = nn.Parameter(
- torch.zeros(1, num_query_token, encoder_config.hidden_size)
- )
- query_tokens.data.normal_(mean=0.0, std=encoder_config.initializer_range)
- return Qformer, query_tokens
-
- def __init__(
- self,
- vit_model="eva_clip_g",
- q_former_model="https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth",
- img_size=224,
- drop_path_rate=0,
- use_grad_checkpoint=False,
- vit_precision="fp16",
- freeze_vit=True,
- freeze_qformer=True,
- num_query_token=32,
- llama_model="",
- prompt_path="",
- prompt_template="",
- max_txt_len=32,
- end_sym='\n',
- low_resource=False, # use 8 bit and put vit in cpu
- device_8bit=0, # the device of 8bit model should be set when loading and cannot be changed anymore.
-
- frozen_llama_proj=True,
- llama_proj_model='',
- fusion_header_type= "seqTransf",
- max_frame_pos= 32,
- fusion_head_layers = 2,
- num_video_query_token = 32,
- ):
- super().__init__()
-
- self.tokenizer = self.init_tokenizer()
- self.low_resource = low_resource
-
- print('Loading VIT')
- self.visual_encoder, self.ln_vision = self.init_vision_encoder(
- vit_model, img_size, drop_path_rate, use_grad_checkpoint, vit_precision
- )
- if freeze_vit:
- for name, param in self.visual_encoder.named_parameters():
- param.requires_grad = False
- self.visual_encoder = self.visual_encoder.eval()
- self.visual_encoder.train = disabled_train
- for name, param in self.ln_vision.named_parameters():
- param.requires_grad = False
- self.ln_vision = self.ln_vision.eval()
- self.ln_vision.train = disabled_train
- logging.info("freeze vision encoder")
- print('Loading VIT Done')
-
- print('Loading Q-Former')
- self.Qformer, self.query_tokens = self.init_Qformer(
- num_query_token, self.visual_encoder.num_features
- )
- self.Qformer.cls = None
- self.Qformer.bert.embeddings.word_embeddings = None
- self.Qformer.bert.embeddings.position_embeddings = None
- for layer in self.Qformer.bert.encoder.layer:
- layer.output = None
- layer.intermediate = None
- self.load_from_pretrained(url_or_filename=q_former_model)
-
- if freeze_qformer:
- for name, param in self.Qformer.named_parameters():
- param.requires_grad = False
- self.Qformer = self.Qformer.eval()
- self.Qformer.train = disabled_train
- self.query_tokens.requires_grad = False
- logging.info("freeze Qformer")
- logging.info('Loading Q-Former Done')
-
- logging.info('Loading LLAMA Tokenizer')
- self.llama_tokenizer = LlamaTokenizer.from_pretrained(llama_model, use_fast=False, use_auth_token=os.environ["API_TOKEN"])
- if self.llama_tokenizer.pad_token is None:
- self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
- DEFAULT_IMAGE_PATCH_TOKEN = ''
- self.llama_tokenizer.add_tokens([DEFAULT_IMAGE_PATCH_TOKEN], special_tokens=True)
- self.IMAGE_PATCH_TOKEN_ID = self.llama_tokenizer.get_vocab()[DEFAULT_IMAGE_PATCH_TOKEN]
-
- logging.info('Loading LLAMA Model')
- if self.low_resource:
- self.llama_model = LlamaForCausalLM.from_pretrained(
- llama_model,
- torch_dtype=torch.float16,
- load_in_8bit=True,
- device_map={'': device_8bit},
- use_auth_token=os.environ["API_TOKEN"]
- )
- else:
- self.llama_model = LlamaForCausalLM.from_pretrained(
- llama_model,
- torch_dtype=torch.float16,use_auth_token=os.environ["API_TOKEN"]
- )
-
- for name, param in self.llama_model.named_parameters():
- param.requires_grad = False
- logging.info('Loading LLAMA Done')
-
-
- logging.info('Loading LLAMA proj')
- self.llama_proj = nn.Linear(
- self.Qformer.config.hidden_size, self.llama_model.config.hidden_size
- )
- if llama_proj_model:
- print("load llama proj weight: {}".format(llama_proj_model))
- llama_proj_weight = torch.load(llama_proj_model, map_location="cpu")
- msg = model.load_state_dict(llama_proj_weight['model'], strict=False)
-
- if frozen_llama_proj:
- # todo frozen llama_proj
- for name, param in self.llama_proj.named_parameters():
- param.requires_grad = False
- logging.info('LLAMA proj is frozen')
- else:
- for name, param in self.llama_proj.named_parameters():
- param.requires_grad = True
- logging.info('LLAMA proj is not frozen')
-
- logging.info('Loading llama_proj Done')
-
- self.max_txt_len = max_txt_len
- self.end_sym = end_sym
-
- if prompt_path:
- with open(prompt_path, 'r') as f:
- raw_prompts = f.read().splitlines()
- filted_prompts = [raw_prompt for raw_prompt in raw_prompts if "" in raw_prompt]
- self.prompt_list = [prompt_template.format(p) for p in filted_prompts]
- print('Load {} training prompts'.format(len(self.prompt_list)))
- print('Prompt Example \n{}'.format(random.choice(self.prompt_list)))
- else:
- self.prompt_list = []
-
- self.video_frame_position_embedding = nn.Embedding(max_frame_pos, self.Qformer.config.hidden_size)
- self.num_video_query_token = num_video_query_token
- self.video_Qformer,self.video_query_tokens = self.init_video_Qformer(num_query_token = num_video_query_token,\
- vision_width=self.Qformer.config.hidden_size, num_hidden_layers =2)
-
- self.video_Qformer.cls = None
- self.video_Qformer.bert.embeddings.word_embeddings = None
- self.video_Qformer.bert.embeddings.position_embeddings = None
- for layer in self.video_Qformer.bert.encoder.layer:
- layer.output = None
- layer.intermediate = None
-
-
- def vit_to_cpu(self):
- self.ln_vision.to("cpu")
- self.ln_vision.float()
- self.visual_encoder.to("cpu")
- self.visual_encoder.float()
-
- def encode_img(self, image):
- device = image.device
- # if self.low_resource:
- # self.vit_to_cpu()
- # image = image.to("cpu")
-
- # input shape b,c,t,h,w
- batch_size,_,time_length,_,_ = image.size()
- image = einops.rearrange(image, 'b c t h w -> (b t) c h w')
- with self.maybe_autocast():
- # embed image features with blip2, out: (b t) q h
- image_embeds = self.ln_vision(self.visual_encoder(image)).to(device)
- image_atts = torch.ones(image_embeds.size()[:-1], dtype=torch.long).to(device)
-
- query_tokens = self.query_tokens.expand(image_embeds.shape[0], -1, -1)
- query_output = self.Qformer.bert(
- query_embeds=query_tokens,
- encoder_hidden_states=image_embeds,
- encoder_attention_mask=image_atts,
- return_dict=True,
- )
-
- # add frame_pos embedding
- position_ids = torch.arange(time_length, dtype=torch.long, device=query_tokens.device)
- position_ids = position_ids.unsqueeze(0).expand(batch_size, -1)
- frame_position_embeddings = self.video_frame_position_embedding(position_ids)
- q_hidden_state = query_output.last_hidden_state
-
- frame_position_embeddings = frame_position_embeddings.unsqueeze(-2)
- frame_hidden_state = einops.rearrange(q_hidden_state, '(b t) q h -> b t q h',b=batch_size,t=time_length)
- frame_hidden_state = frame_position_embeddings + frame_hidden_state
-
- # frame attention
- frame_hidden_state = einops.rearrange(frame_hidden_state, 'b t q h -> b (t q) h',b=batch_size,t=time_length)
- frame_atts = torch.ones(frame_hidden_state.size()[:-1], dtype=torch.long).to(device)
- video_query_tokens = self.video_query_tokens.expand(frame_hidden_state.shape[0], -1, -1)
-
- # print('attention')
- # print(video_query_tokens.size())
- # print(frame_hidden_state.size())
- video_query_output = self.video_Qformer.bert(
- query_embeds=video_query_tokens,
- encoder_hidden_states=frame_hidden_state,
- encoder_attention_mask=frame_atts,
- return_dict=True,
- )
- video_hidden = video_query_output.last_hidden_state
-
- inputs_llama = self.llama_proj(video_hidden)
- atts_llama = torch.ones(inputs_llama.size()[:-1], dtype=torch.long).to(image_embeds.device)
- return inputs_llama, atts_llama
-
- def prompt_wrap(self, img_embeds, atts_img, prompt):
- if prompt:
- batch_size = img_embeds.shape[0]
- # print(prompt)
- p_before, p_after = prompt.split('