Giter Site home page Giter Site logo

Comments (2)

oscarbg avatar oscarbg commented on May 27, 2024

I was going to open an issue with nbody sample not building on ComputeCpp SDK 2.0..
it's the bug the same as I'm seeing?
all errors are similar to:

sycl-bench/single-kernel/nbody.cpp:237:32: error: no viable overloaded '='
              my_particle(idx) = (idx.get_global_id(0) < problem_size) ? particles_access[idx.get_global_id(0)]
              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

full log:

[ 54%] Built target local_mem
[ 55%] Built target dag_task_throughput_independent_dag_task_throughput_independent.cpp_0_ih
[ 57%] Built target dag_task_throughput_independent
[ 58%] Building ComputeCpp integration header file /home/cosmic/tensor/sycl-bench/build/nbody_nbody.cpp.sycl
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:237:32: error: no viable overloaded '='
              my_particle(idx) = (idx.get_global_id(0) < problem_size) ? particles_access[idx.get_global_id(0)]
              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/group.h:238:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_item<1, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:40)>' requested here
    detail::kernelgen_parallel_for_work_item<dimensions, workItemFunctionT>(
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:17: note: in instantiation of function template specialization 'cl::sycl::group<1>::parallel_for_work_item<(lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:40)>' requested here
            grp.parallel_for_work_item([&](sycl::h_item<1> idx) {
                ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<float>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<float>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<float> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:344:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<float>>' requested here
  app.run< NBodyHierarchical<float> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'float' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:244:46: error: no viable overloaded '='
                scratch[idx.get_local_id(0)] = (idx.get_global_id(0) < problem_size)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/group.h:238:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_item<1, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:42)>' requested here
    detail::kernelgen_parallel_for_work_item<dimensions, workItemFunctionT>(
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:19: note: in instantiation of function template specialization 'cl::sycl::group<1>::parallel_for_work_item<(lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:42)>' requested here
              grp.parallel_for_work_item([&](sycl::h_item<1> idx) {
                  ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<float>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<float>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<float> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:344:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<float>>' requested here
  app.run< NBodyHierarchical<float> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'float' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:237:32: error: no viable overloaded '='
              my_particle(idx) = (idx.get_global_id(0) < problem_size) ? particles_access[idx.get_global_id(0)]
              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1568:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_group<1, HierarchicalNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:231:11)>' requested here
    detail::kernelgen_parallel_for_work_group<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:229:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for_work_group<HierarchicalNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:231:11), 1>' requested here
      cgh.parallel_for_work_group<HierarchicalNBodyKernel<float_type>>(sycl::range<1>{problem_size / local_size},
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<float>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<float>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<float> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:344:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<float>>' requested here
  app.run< NBodyHierarchical<float> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'float' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:244:46: error: no viable overloaded '='
                scratch[idx.get_local_id(0)] = (idx.get_global_id(0) < problem_size)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'float' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:237:32: error: no viable overloaded '='
              my_particle(idx) = (idx.get_global_id(0) < problem_size) ? particles_access[idx.get_global_id(0)]
              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/group.h:238:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_item<1, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:40)>' requested here
    detail::kernelgen_parallel_for_work_item<dimensions, workItemFunctionT>(
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:17: note: in instantiation of function template specialization 'cl::sycl::group<1>::parallel_for_work_item<(lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:235:40)>' requested here
            grp.parallel_for_work_item([&](sycl::h_item<1> idx) {
                ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<double>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<double>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<double> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:345:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<double>>' requested here
  app.run< NBodyHierarchical<double> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'double' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:244:46: error: no viable overloaded '='
                scratch[idx.get_local_id(0)] = (idx.get_global_id(0) < problem_size)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/group.h:238:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_item<1, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:42)>' requested here
    detail::kernelgen_parallel_for_work_item<dimensions, workItemFunctionT>(
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:19: note: in instantiation of function template specialization 'cl::sycl::group<1>::parallel_for_work_item<(lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:243:42)>' requested here
              grp.parallel_for_work_item([&](sycl::h_item<1> idx) {
                  ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<double>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<double>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<double> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:345:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<double>>' requested here
  app.run< NBodyHierarchical<double> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'double' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:237:32: error: no viable overloaded '='
              my_particle(idx) = (idx.get_global_id(0) < problem_size) ? particles_access[idx.get_global_id(0)]
              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1568:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_work_group<1, HierarchicalNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:231:11)>' requested here
    detail::kernelgen_parallel_for_work_group<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:229:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for_work_group<HierarchicalNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:231:11), 1>' requested here
      cgh.parallel_for_work_group<HierarchicalNBodyKernel<float_type>>(sycl::range<1>{problem_size / local_size},
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:327:11: note: in instantiation of member function 'NBody<double>::submitHierarchical' requested here
    this->submitHierarchical(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyHierarchical<double>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyHierarchical<double> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:345:7: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyHierarchical<double>>' requested here
  app.run< NBodyHierarchical<double> >();
      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'double' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:244:46: error: no viable overloaded '='
                scratch[idx.get_local_id(0)] = (idx.get_global_id(0) < problem_size)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'double' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:170:27: error: no viable conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'NBody<float>::particle_type' (aka 'vec<float, 4>')
            particle_type my_particle = (global_id < num_particles) ? particles_access[global_id]
                          ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11: note: in instantiation of exception specification for 'operator()' requested here
          [=, dt = this->dt, gravitational_softening = this->gravitational_softening](sycl::nd_item<1> tid) {
          ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1485:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_nd<1, NDRangeNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11)>' requested here
    detail::kernelgen_parallel_for_nd<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:158:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for<NDRangeNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11), 1>' requested here
      cgh.parallel_for<NDRangeNBodyKernel<float_type>>(execution_range,
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:303:11: note: in instantiation of member function 'NBody<float>::submitNDRange' requested here
    this->submitNDRange(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyNDRange<float>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyNDRange<float> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:348:9: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyNDRange<float>>' requested here
    app.run< NBodyNDRange<float> >();
        ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9198:3: note: candidate constructor not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4> &' for 1st argument
  vec(const vec<dataT, kElems>& rhs);
  ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9183:3: note: candidate template ignored: could not match 'swizzled_vec<float, kElemsRhs, kIndexRhsN...>' against 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values)
  vec(const swizzled_vec<dataT, kElemsRhs, kIndexRhsN...>& rhs);
  ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:174:33: error: no viable overloaded '='
              scratch[local_id] = (global_id < num_particles) ? particles_access[offset + local_id]
              ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1485:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_nd<1, NDRangeNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11)>' requested here
    detail::kernelgen_parallel_for_nd<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:158:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for<NDRangeNBodyKernel<float>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11), 1>' requested here
      cgh.parallel_for<NDRangeNBodyKernel<float_type>>(execution_range,
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:303:11: note: in instantiation of member function 'NBody<float>::submitNDRange' requested here
    this->submitNDRange(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyNDRange<float>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyNDRange<float> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:348:9: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyNDRange<float>>' requested here
    app.run< NBodyNDRange<float> >();
        ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'const vec<float, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'float __attribute__((ext_vector_type(4)))' (vector of 4 'float' values) to 'float' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:170:27: error: no viable conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'NBody<double>::particle_type' (aka 'vec<double, 4>')
            particle_type my_particle = (global_id < num_particles) ? particles_access[global_id]
                          ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11: note: in instantiation of exception specification for 'operator()' requested here
          [=, dt = this->dt, gravitational_softening = this->gravitational_softening](sycl::nd_item<1> tid) {
          ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1485:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_nd<1, NDRangeNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11)>' requested here
    detail::kernelgen_parallel_for_nd<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:158:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for<NDRangeNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11), 1>' requested here
      cgh.parallel_for<NDRangeNBodyKernel<float_type>>(execution_range,
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:303:11: note: in instantiation of member function 'NBody<double>::submitNDRange' requested here
    this->submitNDRange(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyNDRange<double>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyNDRange<double> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:349:9: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyNDRange<double>>' requested here
    app.run< NBodyNDRange<double> >();
        ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9198:3: note: candidate constructor not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4> &' for 1st argument
  vec(const vec<dataT, kElems>& rhs);
  ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9183:3: note: candidate template ignored: could not match 'swizzled_vec<double, kElemsRhs, kIndexRhsN...>' against 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values)
  vec(const swizzled_vec<dataT, kElemsRhs, kIndexRhsN...>& rhs);
  ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:174:33: error: no viable overloaded '='
              scratch[local_id] = (global_id < num_particles) ? particles_access[offset + local_id]
              ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/apis.h:1485:13: note: in instantiation of function template specialization 'cl::sycl::detail::kernelgen_parallel_for_nd<1, NDRangeNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11)>' requested here
    detail::kernelgen_parallel_for_nd<
            ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:158:11: note: in instantiation of function template specialization 'cl::sycl::handler::parallel_for<NDRangeNBodyKernel<double>, (lambda at /home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:159:11), 1>' requested here
      cgh.parallel_for<NDRangeNBodyKernel<float_type>>(execution_range,
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:303:11: note: in instantiation of member function 'NBody<double>::submitNDRange' requested here
    this->submitNDRange(this->particles_buf.get(), this->velocities_buf.get());
          ^
/home/cosmic/tensor/sycl-bench/include/common.h:83:13: note: in instantiation of member function 'NBodyNDRange<double>::run' requested here
          b.run();
            ^
/home/cosmic/tensor/sycl-bench/include/common.h:214:11: note: in instantiation of function template specialization 'BenchmarkManager<NBodyNDRange<double> >::run<>' requested here
      mgr.run(additional_args...);
          ^
/home/cosmic/tensor/sycl-bench/single-kernel/nbody.cpp:349:9: note: in instantiation of function template specialization 'BenchmarkApp::run<NBodyNDRange<double>>' requested here
    app.run< NBodyNDRange<double> >();
        ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9253:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'const vec<double, 4>' for 1st argument
  vec<dataT, kElems>& operator=(const vec<dataT, kElems>& rhs);
                      ^
/media/cosmic/unix/2025/ComputeCpp-CE-2.0.0-x86_64-linux-gnu/include/SYCL/vec_impl.h:9259:23: note: candidate function not viable: no known conversion from 'double __attribute__((ext_vector_type(4)))' (vector of 4 'double' values) to 'double' for 1st argument
  vec<dataT, kElems>& operator=(dataT rhs);
                      ^
12 errors generated.
make[2]: *** [CMakeFiles/nbody_nbody.cpp_0_ih.dir/build.make:80: nbody_nbody.cpp.bc] Error 1
make[1]: *** [CMakeFiles/Makefile2:1663: CMakeFiles/nbody_nbody.cpp_0_ih.dir/all] Error 2
make: *** [Makefile:147: all] Error 2

from sycl-bench.

illuhad avatar illuhad commented on May 27, 2024

If I recall correctly, I think the issue was more of a semantic nature. I think the code is correct as per the specification. I don't think we did any testing with ComputeCpp 2.0, so this might be a regression on their part. Can you try with ComputeCpp 1.3?

from sycl-bench.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.