getting false negative error by SYCLomatic when migrating external CUDA host device function template
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con el reproductor C++ proporcionado e inspecciona el tratamiento que hace SYCLomatic de las declaraciones de plantillas externas durante la migración de CUDA a SYCL. Compara la salida migrada con los diagnósticos del compilador indicados y el comportamiento de icpx; se considera terminado cuando el reproductor migra sin los errores de falso negativo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When I try to migrate the code containing extern template
#include <cuda_runtime.h>
template <typename Outtype>
class foo1{};
template <typename Out>
__device__ __host__ foo1<Out> foo()
{
return foo1<Out>{};
}
extern template foo1<float> foo();
extern template foo1<double> foo();
int main(){
foo1<float> foo();
}
I got the following errors:
error: explicit instantiation of 'foo' does not refer to a function template, variable template, member function, member class, or static data member
16 | extern template foo1<float> foo();
note: candidate template ignored: target attributes do not match
8 | __device__ __host__ foo1<Out> foo()
error: explicit instantiation of 'foo' does not refer to a function template, variable template, member function, member class, or static data member
17 | extern template foo1<double> foo();
note: candidate template ignored: target attributes do not match
8 | __device__ __host__ foo1<Out> foo()
code after migration:
#include <sycl/sycl.hpp>
#include <dpct/dpct.hpp>
template <typename Outtype>
class foo1{};
template <typename Out>
foo1<Out> foo()
{
return foo1<Out>{};
}
extern template foo1<float> foo();
extern template foo1<double> foo();
int main(){
foo1<float> foo();
}
However, icpx is able to compile the migrated code without any issues.
To reproduce
#include <cuda_runtime.h>
template <typename Outtype>
class foo1{};
template <typename Out>
__device__ __host__ foo1<Out> foo()
{
return foo1<Out>{};
}
extern template foo1<float> foo();
extern template foo1<double> foo();
int main(){
foo1<float> foo();
}
Environment
- OS: Linux
- Target device and vendor: Nvidia GPU
- DPC++ version: Intel(R) oneAPI DPC++/C++ Compiler 2024.2.0 (2024.2.0.20240602)
Additional context
No response
- Lenguaje dominante
- LLVM
- Estrellas
- 292
- Forks
- 99
- Merge medio
- 5 d 5 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de oneapi-src/SYCLomatic
-
Add Thrust APIsAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
oneapi-src/SYCLomatic#3018 ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
oneapi-src/SYCLomatic#2962 · 1 comentario ·
-
migration of uint3Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
oneapi-src/SYCLomatic#2961 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
oneapi-src/SYCLomatic#2920 · 1 comentario ·
-
Hackathon
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
oneapi-src/SYCLomatic#2685 ·
Todos los issues de oneapi-src/SYCLomatic
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
partiql/partiql-lang-kotlin#1972 ·
-
area:protocol bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area:backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Chelis-Lang/chelis#3500 ·
Los mantenedores suelen responder en 1 día